mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ensure we send a mimetype when upload to github
This commit is contained in:
parent
e52d62e71d
commit
519a90abdf
@ -196,7 +196,7 @@ class GitHub(Base): # {{{
|
|||||||
)
|
)
|
||||||
|
|
||||||
def do_upload(self, url, path, desc, fname):
|
def do_upload(self, url, path, desc, fname):
|
||||||
mime_type = mimetypes.guess_type(fname)[0]
|
mime_type = mimetypes.guess_type(fname)[0] or 'application/octet-stream'
|
||||||
self.info('Uploading to GitHub: %s (%s)' % (fname, mime_type))
|
self.info('Uploading to GitHub: %s (%s)' % (fname, mime_type))
|
||||||
with ReadFileWithProgressReporting(path) as f:
|
with ReadFileWithProgressReporting(path) as f:
|
||||||
return self.requests.post(
|
return self.requests.post(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user