We have PHP code on a server that receives files into $_FILE and then stores them based on user/security considerations.
We have client code that processes some data and generates a file into a variable $fileToSend- as one example, think of the output from a file that the client has read and encrypted, or as another example think of the results from generating file to a variable using FDPF's Output("", "S")
which returns the resulting PDF file as a string. The $fileToSend could be pretty large (500MB).
We could save the variable as a file and then send the file as a curlFile
using curl
, but that just seems wasteful of time, space and effort.
How can we POST from a variable on the PHP client side and have it appear in $_FILE on the server side?