-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️(backend) allow uploading more types of attachments #309
Conversation
385085c
to
69207ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :) I've made few nit picking comments
0119d10
to
0171de7
Compare
5b0a877
to
9d5139a
Compare
@qbey I had to change things a little because I realized the mimetype guessed by magic depends on the OS when my tests failed to pass in the CI... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not aware the extension guess depends on the OS, moreover for simple file types... This fix looks good to me then, I don't have a better approach in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review is from a frontside perspective.
Works well! Nice to have the video tag automatically added in the doc when we add a video ext.
Bad point but on the frontend side, I can see we have to implement the toolbar to be able to download the files.
scrnli_4VrNcOng6R55mX.webm
96db401
to
509834a
Compare
Freezegun is for testing and should not be installed in the production image.
We want to allow users to upload files to a document, not just images. We try to enforce coherence between the file extension and the real mime type of its content. If a file is deemed unsafe, it is still accepted during upload and the information is stored as metadata on the object for display to readers.
509834a
to
470d38e
Compare
Purpose
We want to allow users to upload files to a document, not just images.
Proposal
We try to enforce coherence between the file extension and the real mime type of its content using magic.
If a file is deemed unsafe, it is still accepted during upload and the information is stored as metadata on the object for display to readers in the frontend.