D
D
Dmitry Lakhno2017-10-10 01:28:50
Laravel
Dmitry Lakhno, 2017-10-10 01:28:50

How to save an image after an AJAX request?

There is a form with a file field. I send an ajax request to a remote server, I get a response.
How can I save a file from the form on the local server if I received true in the response?
Ideally, if you tell me how to implement it on Laravel :)
PS I use jquery.validate for validation

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2017-10-10
@lahno

Did I understand correctly that the form data was sent to a remote server and a positive result was already received. And after that, you need to send the same form data to the local server in order to save it already at home?
I think it's impossible.
It is necessary to send the data initially to the local server. The script that received the data from the form sends the data to the remote server with curl, and if true is returned from there, then it saves the data on the local server. And then he answers the client about success or failure.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question