Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Fix parameter name on http files #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevin-verschaeve
Copy link

@kevin-verschaeve kevin-verschaeve commented Dec 17, 2018

Hello,

Today I was facing an issue, that I fixed with the code in the PR.

The issue is, that I was not having the same results with an UploadedFile object in test and in dev.

For now, if you add a file in your request like this:

    When I send a POST request to "/upload" with parameters:
      | key    | value                 |
      | file   | @my_real_filename.txt |

In tests, the property $uploadedFile->getClientOriginalName() returns file, and $uploadedFile->getClientOriginalExtension() returns null.

But in dev, same calls returns my_real_filename.txt and txt.

So my feature works in dev, but does not pass tests ...

This come from the originalName of the UploadedFile class.

Let me know if this sounds good or bad to you.

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant