Opened 16 years ago

Closed 16 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)

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

Download all attachments as: .zip

Change History (2)

by cpinto, 16 years ago

comment:1 by Russell Keith-Magee, 16 years ago

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