2

Is php://input written to a temp file for large uploads? I mean, is it safe to send 200 MB in the post body, assuming that all ini directives are set? I don't see any notes in the PHP docs about it, just that it is a stream. Maybe that is assumed (that it will go to a temp file if needed)?

The reason it could be needed is related to iOS video upload.

ex. What is the correct way of sending large file through HTTP POST, without loading the whole file into ram?

3
  • stackoverflow.com/questions/6106009/…
    – user557846
    Commented Sep 29, 2015 at 2:21
  • It doesn't address the subject, but helpful. Commented Sep 29, 2015 at 16:55
  • Not PHP specific, but generally "network stream" (which is how HTTP requests would come in) is not "written" anywhere - one need to read from stream and do something with the data (including simply ignoring it) - i.e. as shown in answer suggested by @Dagon copying stream directly to file demonstrates that particular version of PHP did not buffer that stream in memory. Commented Oct 28, 2015 at 6:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.