Back

[SOLVED] Sveltekit FileDropzone from '@skeletonlabs/skeleton' image upload to appwrite.

  • 0
  • Web
  • Storage
Camo
23 May, 2023, 16:09

Has anyone used this component, https://www.skeleton.dev/components/file-dropzone and combined it with Appwrite? I can't seem to be able to get it working.

TL;DR
The user was having trouble combining the Sveltekit FileDropzone component from '@skeletonlabs/skeleton' with Appwrite for image uploads. However, they solved the issue by using the `uploadArticleImage` function and passing the file to the `createFile` function. They were struggling to get the file path initially but managed to resolve it.
Camo
23 May, 2023, 16:23

after dragging image to the component, i can get let files: FileList; files[0].name, but that doesn't give me much.. Don't understand how to get the path so i can upload the file..

Drake
23 May, 2023, 17:46

Have you tried passing the file to the create function?

Camo
24 May, 2023, 13:44

Yes that worked, js uploadArticleImage: async (file: any) => { return await storage.createFile('images', ID.unique(), file); },

Drake
24 May, 2023, 15:47

[SOLVED] Sveltekit FileDropzone from '@skeletonlabs/skeleton' image upload to appwrite.

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