Prevent data being saved to model on file/s upload?
Hi, I have an upload form and all I want it to do it upload the files, I don't need it to save anything to the database or do anything.
Any ideas how once the upload has been done, the modal simply closes and resets, please?
Clicking create takes too long for something that isn't required, so I just want rid, thanks. π
3 Replies
Can you explain the bigger picture? And particularly, 1. what "else" is your Form doing, and 2. what is the uploaded file being used for?
For instance, if you were uploading a CSV file to use for importing something, you could use an Action that shows a modal with a form to upload the file, and when the upload is finished and the form is submitted, the modal closes and the loaded file gets passed to the next action step of importing the uploaded data. THe file itself is never recorded in the database (only the processing of its contents, which is completely separate from the Form). Another question: what "step" is "taking too long"? Is it actually the file-upload via filepond that's taking "too long" and not the submission of the form? Important to know what the real pain point is ... π
For instance, if you were uploading a CSV file to use for importing something, you could use an Action that shows a modal with a form to upload the file, and when the upload is finished and the form is submitted, the modal closes and the loaded file gets passed to the next action step of importing the uploaded data. THe file itself is never recorded in the database (only the processing of its contents, which is completely separate from the Form). Another question: what "step" is "taking too long"? Is it actually the file-upload via filepond that's taking "too long" and not the submission of the form? Important to know what the real pain point is ... π
Yea. What is the goal here? Sounds like youβre just upload a file to the server and not doing anything with it.
Thanks. It forms part of several jobs, which use various other tables post-processing.
In truth I inadvertently realised after posting (as you do - doh!) that it as slow because I was uploading to S3, so it was uploading once to tmp, then moving it to S3, which is of course slow!
I've resolved it in a way I'm happy with now by simply storing it locally and moving it to S3 as part of a job, which is actually a more robust solution anyway.
Thanks for trying to help.