Skip to content

Commit e23d99d

Browse files
authored
Merge pull request #45 from S10wD0wn/py3
correct mimetype detection in fcpupload
2 parents b9ccc64 + 4e149b1 commit e23d99d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fcp3/upload.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,10 @@ def main():
165165
if infile and uri[-2:] == "@/" and uri[:3] in keytypes:
166166
uri += node.toUrlsafe(infile)
167167

168-
169168
# figure out a mimetype if none present
170169
mimetype = args.mimetype
171170
if infile and mimetype is None:
172-
base, ext = os.path.splitext(infile)
173-
if ext:
174-
mimetype = mimetypes.guess_type(ext)[0]
171+
mimetype = mimetypes.guess_type(infile)[0]
175172

176173
if mimetype:
177174
# mimetype explicitly specified, or implied with input file,

0 commit comments

Comments
 (0)