Vue-dropzone: [Feature Request] Being able to upload file into client without having to send it to some server

Created on 19 Jul 2017  路  3Comments  路  Source: rowanwins/vue-dropzone

I want to perform some actions on a file within the client and not send it anywhere. Would be cool if dropzone supported that. So far Dropzone requires an URL to post the data to.

Most helpful comment

This was one of the first things I wanted to do as well. It's not supported by default by Dropzone, so this Vue implementation also won't have it.

You can sort of work around this by setting auto-process-queue to false. Then create your own function to upload the files that are within the Dropzone. You can get a reference to them with this.$refs.yourdropzoneid.getAcceptedFiles(). This will not update the actual dropzone itself though, so no progressbars or anything.

All 3 comments

This was one of the first things I wanted to do as well. It's not supported by default by Dropzone, so this Vue implementation also won't have it.

You can sort of work around this by setting auto-process-queue to false. Then create your own function to upload the files that are within the Dropzone. You can get a reference to them with this.$refs.yourdropzoneid.getAcceptedFiles(). This will not update the actual dropzone itself though, so no progressbars or anything.

Thanks for the suggested workaround @Ragura , that's the best I can think of at the moment as well.

There is a better way to do it as you can see that the dropzone homepage actually does it on their demo. I've had a look at their source code but it's not exactly clear as to how they're making it work. I'll keep thinking though

@Ragura , @rowanwins

Thank you two! For now I'm going to go with @Ragura 's workaround.

Was this page helpful?
0 / 5 - 0 ratings