K
K
Kusmich2015-09-21 14:25:30
JavaScript
Kusmich, 2015-09-21 14:25:30

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: *");
?>


The problem is that I do not have access to the site from which I want to take pictures. Is there any way to solve this problem using only client-side (browser js), without using server-side languages?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-09-21
@Kusmich

Well , something like that

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question