Tried S3 upload file with small files worked but not large files

Hi kapa, i used the template that contains s3 upload feature, configured my s3 bucket and creds and successfully uploaded small sized videos, but when I choose a big video file the front end instantly shows me that its uploaded but when I check the bucket I cannot find large videos uploaded. Can you help me, please keep in mind that I am very new to node js and react 🫡
8 Replies
kapa.ai
kapa.ai2mo ago
Hi @Tareq Az. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, I don't have specific details about handling large file uploads with S3 in Wasp. However, I can offer some general guidance and suggestions: 1. File size limits: S3 and your server configuration might have file size limits. Check your S3 bucket settings and server configurations to ensure they allow for large file uploads. 2. Client-side handling: The front-end might be showing the upload as complete before it actually finishes. This could be due to how the upload progress is being tracked. You may need to adjust your client-side code to accurately reflect the upload status. 3. Chunked uploads: For large files, it's often recommended to use chunked uploads. This involves breaking the file into smaller pieces and uploading them separately. However, implementing this requires more complex code that isn't provided in the basic examples. 4. Server-side handling: Ensure your server can handle large file uploads. You might need to adjust settings like maximum request size or timeout duration. 5. Error handling: Implement proper error handling and logging on both client and server sides to catch and identify any issues during the upload process. For a more detailed guide on file uploading in Wasp, you can refer to the open-saas template documentation: File Uploading Guide (https://docs.opensaas.sh/guides/file-uploading/). While this might not directly address your large file issue, it could provide some insights into how file uploading is implemented in Wasp. If you continue to face issues, you might need to look into more advanced file upload solutions or seek specific help with your implementation. Remember, handling large file uploads can be complex, especially for those new to Node.js and React. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Tareq Az, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Tareq Az
Tareq AzOP2mo ago
I forgot to mention how thankful I am for all the effort that went into Wasp as I tried to upload to my s3 bucket long time ago and gave up after I struggled for so long with an error related CORS. And I was blown away that using Wasp I was able to upload a file just through following the documentation https://docs.opensaas.sh/guides/file-uploading/ within less than an hour 🤍🤍
OpenSaaS.sh
File Uploading
Open SaaS is a free, open-source, full-stack SaaS starter kit for React + NodeJS.
miho
miho2mo ago
@Vinny (@Wasp) @martinsos check it out
Vinny (@Wasp)
Vinny (@Wasp)2mo ago
that's great to hear can you provide more info on the error you're getting when uploading a large file? have you tried searching for file size limit restrictions on AWS S3?
Tareq Az
Tareq AzOP2mo ago
I just gave it another try (but this time I waited a bit longer) and it actually uploaded the large video file🙏🙏 I guess my impatience was the only issue, besides the frontend as it instantly shows as if the file uploaded. I will try to build some type of a progress bar for other impatient people like me 🤣
martinsos
martinsos2mo ago
Ooooh that is a good catch! @Tareq Az would you mind openning an issue for it on our OpenSaas GIthub? And if you then later implement an improvement, we would love if you create a PR for it!
Tareq Az
Tareq AzOP2mo ago
Sounds good, issue #313 opened! I am very new to react and node so it may take me a while 🤣
Vinny (@Wasp)
Vinny (@Wasp)2mo ago
Nice. I'll take a look today
Want results from more Discord servers?
Add your server