symfony/symfony — pull request #6777 by thewilkybarkid (2013-01-17 14:41:30+00:00)
Title: [DomCrawler] Keep temporary file copy filenames

| Q | A
| ------------- | ---
| Bug fix? | kind of
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |

DomCrawler's `FileFormField` takes a copy of the file and gives it a new filename (on Windows something like `upl8BF8.tmp`). Using Goutte I've tried to upload an image which is rejected by the server (in this case Drupal) since it no longer has a `.jpg` filename. This PR changes the copy so that it goes into a unique path and keeps its filename. (It also adds tests to make sure the copy is actually there.)