Use mimeType from metadata instead of blindly re-determining it during uploads
ClosedPublic

Authored by barchiesi on Jul 28 2019, 6:27 PM.

Details

Summary

LibKGAPI uses a files name and data when determining content type. If the File upload mime-type is specified, don't re-determine it.
This avoids having to expose the upload filename while using temporary files.

Diff Detail

Repository
R477 KGAPI Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
barchiesi created this revision.Jul 28 2019, 6:27 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptJul 28 2019, 6:27 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
barchiesi requested review of this revision.Jul 28 2019, 6:27 PM

This change was inspired by D22628.

dvratil accepted this revision.Jul 29 2019, 8:10 AM

Nice! I was afraid we might have to introduce a new method for this, but this is great - I think it's OK to land this onto Applications/19.08, if you can do it before the Thursday freeze.

This way KIO GDrive depending on 19.08 can make use of this feature.

This revision is now accepted and ready to land.Jul 29 2019, 8:10 AM
This revision was automatically updated to reflect the committed changes.