Can't upload binary files (ascii works fine)

42 views
Skip to first unread message

erikask

unread,
Dec 12, 2012, 11:14:50 AM12/12/12
to djangofi...@googlegroups.com
Hello

I've got a weird issue that seems close to impossible to track down the source of. I'm using django 1.3.6, filebrowser, 3.4.3, grappelli 2.3.9, everything works except for file uploads of binary files. I can upload any text file, seemingly irregardless of extension, so far I've tried everything from .txt to .cc to no extension. However any file that is binary fails, with the annoying error message "Failed", no other info. From apache logs i found that uploading caused a 500 error, unknown in what step of the process.

This error also only occurs on the production server, however file upload using djangos standard file upload fields works fine, both binary and others, so the apache 2 clearly accepts file-uploads. On my laptop (dev- machine) this problem doesn't exist. I've tried to reproduce it but no success.

Since this seems to be machine specific I of course don't expect anyone to solve it of the bat, but if anyone can provide info on how filebrowser uploads differ from standard file-field uploads, a more step by step on the underlying processess or anything else that could guide my search to track it down I'd be grateful.

All other functionality works, creating directories etc, manually placing iamges and pdfs in the structure I can browse and download. ./manage.py test filebrowser returns "ok" (and a runtime).

p.s.
Updating filebrowser and hence django is unfortunately not an option.
d.s.

patrick kranzlmueller

unread,
Dec 12, 2012, 12:50:42 PM12/12/12
to djangofi...@googlegroups.com
Did you check _upload_file by adding some print statements and see
where it breaks?

Differences between filebrowser uploads and standard file–field
uploads is that we use http://fineuploader.com (an older version).
Other than that, there´s not much difference (see
https://github.com/sehmaschine/django-filebrowser/blob/filebrowser_3_4/filebrowser/functions.py#L247)
since we´re using storage.save(...).

Regards,
Patrick


2012/12/12 erikask <ask....@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Django FileBrowser" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/djangofilebrowser/-/ICp7avH24AAJ.
> To post to this group, send email to djangofi...@googlegroups.com.
> To unsubscribe from this group, send email to
> djangofilebrow...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/djangofilebrowser?hl=en.
Reply all
Reply to author
Forward
0 new messages