Can't upload non image types - e.g PDF/PPTX for Articles
It seems that only accept="image/*" is preventing the ability to upload non images to Articles.
Attempted to add mimetype acceptances of pdf and pptx however they are rejected.
Feat:
- Add ability to allow any file type as long as it matches the mime type override.
- Separation so image only for QETA however allow others for Articles.
Hi,
The issue with other mimetypes is that the rendering will totally break, so they should be handled properly in the UI as well, not just in the backend.
Oh right, it renders it in the output :\
I guess links to download the file if non image could work?
Yeah, probably something like that but requires some tinkering 😁
If anyone is up to contribute, it would be awesome!
Did you try adding the mimetypes to config qeta.storage.allowedMimeTypes and see how it renders? I think it probably still tries to render it as a image because it's added in the markdown as image. But modifying the markdown to make it a link instead might work 🤔
I did change the mimeTypes but it still disallows the file to be uploaded due to the accept="image/*" so it never attempted a render.
I'll have to clone the repo and test some minor changes see best way to push forward.
@veenarm oh true, it should be configured to the frontend as well. If you come up with a solution, I would be more than happy to accept a PR! I can also take a look at some point but it might be weeks from now as I am quite busy at the moment (you know, getting the world ready before summer 😁)
@veenarm checked this a bit and the accept=image/* is only in the header image input. It should be possible to upload other files in the article content if you have the qeta.storage.allowedMimeTypes config supporting that.
Can I work on this, please?
@BlessingEmejulu sure!
@veenarm can you try with the latest release? I think I made it more understandable how to upload stuff
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Tested the lastest version, and it only accepts images in both articles and q&a - mostly due to the way it's designed which is fine.. Maybe instead a feature could be to add a 'add documents to articles?'
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.