live_vue icon indicating copy to clipboard operation
live_vue copied to clipboard

Is there an Example on how to handle file uploading?

Open Maxino22 opened this issue 1 year ago • 1 comments

const submitFiles = () => {
  console.log('Email:', email.value);
  console.log('Files:', fileNames.value);

  hook.upload("image", files.value);
  hook.pushEvent("save", { email: email.value })
};

This is what I thougt would work not sure on the server side

Maxino22 avatar Sep 12 '24 08:09 Maxino22

To be honest I didn't yet try to tackle file uploads with LiveVue.

Would be amazing if you could try to make it working. useLiveVue returns a hook instance with upload method. Just I'm not sure if it would be enough, there's likely some more to the mix, probably there's a need for a form with correct inputs.

Valian avatar Sep 12 '24 10:09 Valian

@Maxino22 I've just added composable for file uploads in LiveVue. It should be trivial now to upload files, please check docs! Should be included in 0.7.0 version, released soon

Valian avatar Jul 29 '25 12:07 Valian

Released in v0.7.0! Please check docs for more details.

Valian avatar Jul 29 '25 14:07 Valian