I get this produced path of an uploaded image:
'..\assets\dist\upload\avatar.jpg'
I'd like make it with this format.
'../assets/dist/upload/avatar.jpg'
I tried with .replace(/[\]/g, '/');
But didn't works with me.
Also, I consult this thread, but didn't resolve my problem. There isn't an example about converting back slash to forward slash.
Only it's possible if we are talking about '..\\assets\\dist\\upload\\avatar.jpg'
. But, my case is '..\assets\dist\upload\avatar.jpg'
.
Have you please any idea about solving that ?.
Big thanks.