Closed wkloucek closed 10 months ago
Not sure if you prefer another solution and/or more investigation. But if it helps to just add this mimetype you can have it quick and easy: https://github.com/cs3org/reva/pull/4116
I think adding non well known mimetypes is only a workaround. I think we should look at why we're doing a lot of complicated mime type to file extension conversions and vice versa.
Then let's plan this ticket properly for one of the next sprints. It is more a story than a bug anyways
@tbsbdr please schedule.
Is your feature request related to a problem? Please describe.
I want to create new files for the OnlyOffice form editor. Forms to be created have the
.docxf
file extension (https://www.onlyoffice.com/blog/de/2022/03/onlyoffice-formulare-oform-docxf). It seems like there is no mimetype for it.When looking at the /hosting/discovery endpoint of OO 7.4 it looks like the editor is the same for docx and docxf:
Therefore you can just create a
.docxf
file and edit it in the form editor view.But I cannot configure oCIS to allow creating docxf forms without cannibalizing a different file format.
Describe the solution you'd like
A possible solution / workaround is to make up a mimetype for docxf files in REVA's
pkg/mime/mime.go
:Then I can configure following actions in the mimetypes section (in this example via the oCIS Helm chart (https://github.com/owncloud/ocis-charts/blob/49eea9b36cffa590b3e40b9e9aa0db1717101bbc/charts/ocis/values.yaml#L232-L243):
It'll leave me with this "New file" menu in Web:
Describe alternatives you've considered
Probably we're doing something really complicated with the mime type to file extension conversion. We could probably unclutter that.