dtect.000.pe
(please specify the URL of the site on which you are experiencing the problem)
No error message visible.
Problem: php is not processing “php://input” properly.
Data should be available there, when uploaded with “Content-Type: application/binary; video/; audio/”
With curl, binary data can be uploaded like this:
curl \
-X POST\
-H 'Content-Type: application/data; audio/*; video/*; audio/wav' \
--data-binary @'audios/amlo1.wav' \
--url 'http://mysite.com/receive.php'
** substitute [http://mysite.com] with your web-site
====================
@audios/amlo1.wav, is local file, in folder "audios", relative to the current directory for curl.
====================
receive.php: takes care of moving/copying the contents in "php://input" to a normal file inside your web-site
====================
This works well when testing php in localhost, with php server.
With Infinityfree php server , does not work at all.
Please notice that this uploading mode is different than uploading with a [html form].
This curl “upload” is not a “multipart/form-data” post request.
( If your answer is to use “multipart/form-data”, please do not write your answer. It is not correct )
This command in curl, allows to upload raw data, without giving the local “file-name”.
Using this curl command, $_FILES does not show any info. All data has to be obtained from “php://input”, and moved or copied to another folder with php.
I need this working properly, because another web-site will be sending my web-site, json data this way. I cannot change the way the other web-site works.
Infinity’s side is not working properly when this kind of upload is taking place. Please fix, if possible for you.
Again, this is not a post request from a “html-form”.
If anyone knows how to receive “php://input” properly in Infinityfree, please let me know.
Thank you very much.