Answer the question
In order to leave comments, you need to log in
How to AJAX send a file generated on the fly by a php script?
The site has a script that generates and returns a PDF from the data passed to it via POST -
example.com/make_pdf_file.php _
example.com/form_result_handler.php _
Answer the question
In order to leave comments, you need to log in
You can try to give the file in base64, and send it to a separate input. Naturally, your _FILES will be empty, since input[type=file] must be initiated only by the user, otherwise it is a security hole.
Those. You should end up with something like this:
But keep in mind that such a mechanism requires additional security checks, the integrity of the transferred file, and so on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question