Can I store images that were uploaded from a client in my project's file structure?

#1

Hello! The users who visit my website will be able to upload images to the site. I want the images to persist. Can I store images that were uploaded from a client in my project’s file structure? If so, how? And if not, how would you recommend storing images that users upload?

Also glitch is really cool!

#2

Hi @sophiaspitulnik, welcome to the Glitch forum! Thank you for your kind words!

If you’re using Express for your site then something like https://www.npmjs.com/package/express-fileupload might be useful. That would allow you to store files in your project’s file system.

One thing to keep in mind, though, is that your project is limited to 200Mb disk space including your code (but not your packages) so if these files are large or if there’s going to be a lot of them you may run into problems there. You can read more about our technical restrictions at https://glitch.com/help/restrictions.

Hope this helps!