#10396 closed (worksforme)
Django File Upload /Image Upload Forms are broken with Safari (3 and beta 4)
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | File uploads/storage | Version: | 1.0 |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Simple form:
class UploadImageForm(forms.Form):
image = forms.ImageField()
When rendered, the choose file button is displayed, but clicking it doesn't work (nothing happens). The same page works fine in Firefox 3 on the same system. JS and HTML debugging facilities inside Safar do not mention any errors.
Change History (12)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Hi,
didn't work out.
Heres the new form:
class UploadImageForm(forms.Form):
funny_name = forms.ImageField()
def clean_up_filename( self ):
name = self.cleaned_data["funny_name"]
and heres the generated HTML
<form enctype="multipart/form-data" action="/images/upload/11/1/" method="POST">
<p><label for="id_funny_name">Funny name:</label> <input type="file" name="funny_name" id="id_funny_name" /></p>
<div class="submit">
<input type="submit" value="Upload Image" />
</div>
</form>
Note that it is the second form on this page. The names do not clash and they POST to different adresses.
Any more ideas?
Greetings,
SirVer
comment:3 by , 17 years ago
| milestone: | → 1.1 |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:6 by , 17 years ago
Hmmm... I cannot replicate in admin, or does it need to be done outside of that?
comment:7 by , 17 years ago
Yes. needs to be done outside of admin. Please see my sample code provided above.
comment:8 by , 17 years ago
Hum... I cannot replicate it even outside of admin (I used Safari 3.2.1 on MacOS). My assumption is that it is a Safari related problem.
Which version are you using ?
Did you try to load a sample file with the same HTML content to see if it is related to Django ?
comment:10 by , 17 years ago
Can someone confirm if this is still around in Safari 4? I cannot seem to replicate in beta 4.
comment:11 by , 17 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
This appears to have been a Safari bug since nobody can confirm it.
My inclination is that this is because safari added an input type image, and thus a field named image inexplicably breaks. Does this problem still occur with other field names?