-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post files does not work (php7.1) #46
Comments
Faced the same problem |
@danielsetreus We could isolate the array keys which are an instanceof \CURLFile and add them after processing the http_build_query() data? |
Closed
nadar
added a commit
to nadar/curl
that referenced
this issue
Nov 14, 2018
This is not tested, but we are facing the same problem with CurlFile Uploads (php-mod#46) - This *should* do the trick.
@danielsetreus https://github.com/php-mod/curl/pull/53/files this should fix the problem - right? |
amouhzi
pushed a commit
that referenced
this issue
Nov 15, 2018
* CurlFile fix This is not tested, but we are facing the same problem with CurlFile Uploads (#46) - This *should* do the trick. * Update README.md
Closed
Merged
amouhzi
pushed a commit
that referenced
this issue
Nov 17, 2018
* CurlFile fix This is not tested, but we are facing the same problem with CurlFile Uploads (#46) - This *should* do the trick. * Update README.md * cs fix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
POSTing files does not work as intended.
This is what I'd like to do:
However what is posted is a string representation of the data, including the CURLFile instance, not the actual file. I.e:
mode=import&file%5Bname%5D=path/to/file/&file%5Bmime%5D=mime_type_of_file&file%5Bpostname%5D=file_post_name
This is due to the
preparePayload
method - that runshttp_build_query
on the data. If I remove those lines everything works as expected.The library should include a way to skip
http_build_query
, or a special method for adding a file to the posted data.Thanks
The text was updated successfully, but these errors were encountered: