vue-file-agent icon indicating copy to clipboard operation
vue-file-agent copied to clipboard

Any way to make use of server response without resorting to manual upload?

Open gutmanl opened this issue 3 years ago • 1 comments

Hi everyone,

I'm working on a project where I need to use the server's response data after uploading a file. Is there any way to get it here without manually implementing the upload? I haven't seen any events that would be usable for this.

gutmanl avatar May 20 '21 11:05 gutmanl

There are 2 events emitted with autoUpload: upload and upload:error. Both contains an array of responses.

<VueFileAgent
    :uploadUrl="'/api/upload'"
    :multiple="true"
    :deletable="true"
    v-model="files"
    @upload="uploadResponse('success', $event)"
    @upload:error="uploadResponse('error', $event)"
></VueFileAgent>

dimzeta avatar Jun 23 '21 22:06 dimzeta