-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpClient] multipart/form-data request issue with file name #36738
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
Comments
Maybe this issue is also related to the "need" to use double quotes around name and filename in the content-disposition part. We also talk about this here : #35443 (comment) @ghostika I use private APIs that do not support file upload requests without theses quotes. Can you please try and confirm that could also solve your issue ? Edit : Thx |
Closing as there is no feedback. Probably a duplicate of #37500 |
This PR was merged into the 4.4 branch. Discussion ---------- [Mime] Fix compat with HTTP requests | Q | A | ------------- | --- | Branch? | 4.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #37500, Fix #36738, Fix #35443 | License | MIT | Doc PR | n/a Commits ------- 52e7d7c [Mime] Fix compat with HTTP requests
Symfony version(s) affected: 5.0.7
Description
I have 2 basic SF projects, one is a fileupload microservice and an admin interface for the users. The workflow is that the user first uploads the file in the admin interface and then it makes a
post
request internally to the microservice.After some debugging, I realized the problem is with the name of the file.
How to reproduce
The upload controller in the MC is a simple Symfony controller.
If I call this endpoint with the HTTP client and with a specified filename, the
$uploadedFile
isnull
.The post request with the HTTP client is the same as the example in the Symfony documentation.
If the originalFilename is a
uuid
or it's not specified, everything is ok.Possible Solution
I can only assume, that the problem is in the HTTP client, but I have no idea where to search for it.
Additional context
Headers:
But if I have the original file with the filename:
Canon EOS 5DS R (8688 × 5792).JPG
In this case, the
$_FILE
global variable is simply empty.The text was updated successfully, but these errors were encountered: