sveltejs / examples

A collection of Svelte(Kit) examples
MIT License
34 stars 5 forks source link

SvelteKit file uploads Node.js #6

Closed karimfromjordan closed 1 year ago

karimfromjordan commented 1 year ago

I split the file upload examples into two — Node.js and S3. They are almost identical in how they are structured and work. Unfortunately, POST requests with SvelteKit do not work in Stackblitz so the only way to test this is to clone this. The CSS is very basic and mostly handles layout for now. Functionality-wise it probably does everything you would from such an example. The only thing that is kinda missing is a place where possible errors get displayed although the only error that can really happen is that a file with the same name is uploaded again, in which case currently the request is rejected and nothing happens.