Opened 6 years ago

Closed 6 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:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:


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 6 years ago.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by cpinto

comment:1 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.