Opened 17 years ago
Closed 17 years ago
#7143 closed (fixed)
Test client sends full path on file upload
Reported by: | cpinto | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The django.test.client.Client, when uploading a file, sets the filename property to the full path, e.g. /some/directory/filename.ext instead of sending only filename.ext.
The django.http.parse_file_upload does not take care of this because it's only prepared to handle IE's use-case, so the proposed patch fixes the problem on the test client side.
Attachments (1)
Change History (2)
by , 17 years ago
Attachment: | client_upload_filename.patch added |
---|
comment:1 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [7577]) Fixed #7143 -- Modified the test client to better match (most) real browser behavior when uploading files. Now, only the file name is sent, rather than the full path. Thanks for the report, cpinto.