-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
New File Upload Input #136
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is this available? Super important feature for our use case. |
@franciscomfcmaia still a work in progress. If you would like to test it out, I think that a first stable version will be available by end of this week. |
how is the Status of the File-Upload feature? :) @PhilReinking |
@Th0rGer almost there, need some further testing and adjustments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will add support for file uploads in forms.
File Input Configuration
The input has for now two configurations when added to a block.
I want to somehow limit this here because I think it might be possibly harmful if users can upload files that are too big. Images, PDFs, texts are files that I would consider reasonable enough to accept. But if users want to upload videos or other large files, that should happen with other services that are optimized for these kinds of file sharing.
File Upload Frontend
The file upload can handle one or multiple files at the same time. This mirrors the native behavior of a single file input.
A user can select via the file explorer or drop files into the drop area on the form.
Uploads should only happen at the end when the user clicks the Submit button. In that way, possible consents or other inputs are safely captured. If the user cancels submitting the form, no data has been uploaded, therefore no need for cleaning up anything on the server.
To make handling of the uploads easy, my idea is to create a new file upload endpoint, that expects the form session and the block interaction the upload is made from. Each file could be uploaded individually, that allows for better error handling and maybe better performance when uploading.
Handling on server