Opened 11 years ago

Closed 11 years ago

#7143 closed (fixed)

Test client sends full path on file upload

Reported by: cpinto Owned by: nobody
Component: Testing framework Version: master
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


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)

client_upload_filename.patch (836 bytes) - added by cpinto 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by cpinto

comment:1 Changed 11 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(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.

Note: See TracTickets for help on using tickets.
Back to Top