This repository was archived by the owner on May 16, 2018. It is now read-only.
[BUG] This fix allows the upload of same filenames in input type file#652
Open
codisart wants to merge 3 commits intozendframework:masterfrom
codisart:bugfix-allow-same-filename-upload
Open
[BUG] This fix allows the upload of same filenames in input type file#652codisart wants to merge 3 commits intozendframework:masterfrom codisart:bugfix-allow-same-filename-upload
codisart wants to merge 3 commits intozendframework:masterfrom
codisart:bugfix-allow-same-filename-upload
Conversation
Member
Author
|
@froschdesign For the unit tests, I was having some trouble setting them up but it is ok now. I have some questions about the failing unit test Zend_File_Transfer_Adapter_HttpTest::testMultiFiles. First, the $_FILES is mocked with the implication that the "name" value can be a path with more than one directory. Shouldn't it be only a filename like picture.jpg, document.docx or script.php ? Secondly, the "tmp_name" value doesn't seem to be mocked properly, or the format %TMP_DIRECTORY%/php123456 can be overriden ? codisart. |
For example, Ios Safari gives the name image.jpg for pcitures from the gallery In the present situation, the first files would be overriden by the last file with the same name. And the getValue of these inputs will return the same fileName with no really mean to identify it. With the use of the unique name from PHP $_FILES in the name column of the $_files array of the Http adapter, the files will be unique and easily identifiable.
|
Hello @froschdesign, any news about this pull request ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For example, Safari on IOS gives the name image.jpg for pictures from the gallery
In the present situation, the first files would be overriden by the last file with the same name.
And the getValue of these inputs will return the same fileName with no really mean to identify it.
With the use of the unique name from PHP $_FILES in the name column of the $_files array of the Http adapter, the files will be unique and easily identifiable.