LaraBABA's avatar

How to reattach an image to refs from a URL?

Hello,

I have an upload field in vue where I submit a form with a picture attached.

But in some cases I may want to duplicate this record, meaning that all the fields are copied to a new form as well as the image attached to this record.

How can I reattach a file

window.location.protocol + '//' + window.location.hostname + '/storage/images/image-gallery/' + imageUrl;

to this.$refs.image.files[0]

Any idea please?

I have been trying different solutions for hours but fail to get this image back into the ref.

Thank you

0 likes
0 replies

Please or to participate in this conversation.