0👍
You have many ways to handle this, I’ll mention two of them in the following:
- Encode URI
HTTP://img.com/img.com --> http%3A%2F%2Fimg.com%2Fimg.jpg
And send it to the backend service, then you need to decode the string in the PHP by using urldecode() function.
let img_path = encodeURIComponent("HTTP://img.com/img.jpg")
- Base64
You can also use btoa() to encode the URL and then send it to the backend. the only thing you need to do is decoding the URL to the origin one by using
base64_decode() in the PHP side.
- [Vuejs]-Laravel, VueJS – keeping 2 arrays in sync while dragging & dropping
- [Vuejs]-Pass parameters via GET to return filter
Source:stackexchange.com