Back

Upload large File with Node in Appwrite

  • 0
  • Flutter
  • Functions
  • Cloud
Zionnite
8 Mar, 2024, 06:12

how do i upload large files lets say a video of 10mins with likely 400mb above with appwrite function

this is my use case

in my app, i allow user to post videos, and videos are posted to a bunny server. before now, i upload the file through http to my apache hosting server then upload it to the bunny server.

Now, i want to eliminate my hosting server, i want Appwrite to be handling everything relating to this project, i want to be able to upload the video through Appwrite function using node-fectch to upload it to bunny server

please if you can provide me with a working code sample how it should be done, i will greatly appreciate...

TL;DR
Developers are unable to directly upload large files to Bunny through Appwrite due to lack of S3 support and middleware. One solution would be to upload the file to storage, then use a function triggered by an event to move the file to Bunny and store the updated URL in a collection. This ensures security by keeping keys or auth details out of the client app.
darShan
8 Mar, 2024, 06:55

Bunny doesn't support S3 so there's no adapter for it on Appwrite. Also there's no middleware support yet.

You could upload directly to bunny but that doesn't seem secure as that requires some sort of key or auth which shouldn't be in your client app.

What you could do is upload to storage, on a function based on event, move the file from storage to bunny and keep the updated file url in maybe a collection.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more