Django

Code

Ticket #7143 (closed: fixed)

Opened 7 months ago

Last modified 6 months ago

Test client sends full path on file upload

Reported by: cpinto Assigned to: nobody
Milestone: Component: Testing framework
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation:
Needs tests: Patch needs improvement:

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

client_upload_filename.patch (0.8 kB) - added by cpinto on 04/30/08 19:56:00.

Change History

04/30/08 19:56:00 changed by cpinto

  • attachment client_upload_filename.patch added.

06/06/08 08:39:43 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(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/Change #7143 (Test client sends full path on file upload)




Change Properties
Action