Answer the question
In order to leave comments, you need to log in
How to upload images via js?
There is an html application that is written exclusively in js. Without using server languages. You need to somehow save pictures via js by url so that the application can use them when it works offline. I tried to solve the problem by pregon in base64 and storing the image in localStorage. This method works, but with one caveat, to request a picture on the server from which the pictures will be taken, you need to allow this action:
<?php
header("Access-Control-Allow-Origin: *");
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question