Skip to content

any idea how can i send files to that process.php using ajax ?  #3

@minanagehsalalma

Description

@minanagehsalalma

for example the first request grabs a file(sends a cookie and receives a file using post) and in the second one i want to send that file that i received to my server.

http = new XMLHttpRequest();
const url = 'test.com/file.img';
http.open('post', url, true);
http.responseType =  "blob";
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
test = http.response
var http2 = new XMLHttpRequest();	
http2.open("post", 'myserver/process.php', true);
http2.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http2.send(test);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions