D
D
Devgru2010-12-08 22:18:55
JavaScript
Devgru, 2010-12-08 22:18:55

Simulate file upload to server from JS?

Hello!
My goal is to compose in JS and send a POST request to the server, uploading a file, the contents of which will not be taken from the user's disk, but generated in JS.
I don’t quite understand what should be used for this - xmlhttprequest or is there something more high-level?
PS The specific goal is to applaud an image created on canvas through the VKontakte API.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
[
[email protected]><e, 2010-12-08
@Devgru

Yes XHR. Form a multipart request.
Only an underwater cobblestone awaits you: you will have to send binary data, and not all browsers can send them with XHR.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question