Allow extensions to announce contentType to AppWrapper, make saving images possible
Description
Necessary for https://github.com/owncloud/web-extensions/pull/43
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Ah, it's the other way round - the extension needs to tell the mimetype to oC Web because we are only creating a new file?
Ah, it's the other way round - the extension needs to tell the mimetype to oC Web because we are only creating a new file?
No, it's updating an existing file
Why do we need this? Can't the extension just use resource.mimeType directly?
I would like to keep the api surface minimal
Open for suggestions regarding the approach. We could check the resource.mimeType (for jpeg/png), but then it's an implicat thing happening in the AppWrapper rathern than the application announcing what it wants to do (albeit the naming/API isn't ideal yet)
@dschmidt do you have a better suggestion with regards to API design? Or @JammingBen maybe?
Hmmm, I can't really think of a non-ugly solution here. You could give apps the possibility to define a custom save task and call that if given. Though it would be a lot of code duplication in this specific case... so I guess I'm fine with this approach. Maybe add a comment to the AppWrapper property to explain how this is used?
The image editor extension PR is closed -> closing this one as well