Vue-dropzone: How to get image URL after dropping image in the dropzone?

Created on 24 Aug 2018  路  3Comments  路  Source: rowanwins/vue-dropzone

Dear author

In a normal img DOM <img :src="imageUrl>
We can read imgUrl via src attribute. How can i read img URL after dropping img in the dropzone ?
I tried to use @vdropzone-files-added event to receive added img information. However, there is not
any information about the img URL as picture:

image

Thank you

awaiting feedback

All 3 comments

Hi @duythang

None of the events give you access to the DOM elements, and even if it did then the img element doesn't have a url in the src, it instead a base64 image string (just like the dataURL in your file object above), that's because the image hasn't yet gone to a server and been given a URL yet.

Hopefully that makes sense
Rowan

Thank you, i found out solution

Can we not get the image location from folder/explorer? We use image from the file explore only to drop in dropzone, not manually but via some code

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dainemedia picture dainemedia  路  4Comments

syrex88 picture syrex88  路  6Comments

ServerJunge picture ServerJunge  路  5Comments

vesper8 picture vesper8  路  4Comments

yhosun picture yhosun  路  5Comments