filebrowsefield with upload #5

Closed
sehmaschine opened this Issue Jul 24, 2011 · 3 comments

Projects

None yet

2 participants

@sehmaschine
Owner

currently, the filebrowsefield only allows for selecting files. direct upload would be a nice feature.

issues:
1. djangos upload_to is very limited.
2. once a file is selected (e.g. with djangos filefield) and there´s an error somewhere within the form, the file is lost. possible workaround: upload on select via ajax to a temp-directory. when the form is saved, move the file from the temp-directory to the upload-to-dir. of course, one should cleanup the temp-dir on a regular basis.

@dheerosaur

Hi Patrick,

Do you know what causes the second issue? It also appears that the FileBrowserFields are not auto-populated when the page is loaded initially in Firefox. I tried adding custom JavaScript to populate these fields from the heading of the dynamic-form on document.load, but that also didn't work.

Thank you,
Dheeraj

@sehmaschine
Owner

the second "issue" is not related to the filebrowsefield ... I´m talking about filefields in general. and it´s not an "issue" but default browser behaviour. you´re talking about something totally different – please use the google-group for asking questions. thanks.

@sehmaschine
Owner

fixed: upload can be done with djangos file-/imagefield and filebrowsers widgets (fileinput, clearablefileinput)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment