Re: [Fileshack-general] unicode charters in file names
fileshack allows you to create your own hosted web file storage, easy
Status: Beta
Brought to you by:
peterkuma
From: Peter K. <pet...@us...> - 2012-06-11 17:34:46
|
Hi Kyrylo, What you describe is indeed a bug. The file name is sent unencoded in an HTTP header, and the UTF-8 byte sequence is expected to be ASCII by python. The master branch already contains a fix to this bug. It should be enough if you just run: git pull ./manage.py collectstatic --noinput and reload the fcgi server (or perhaps try `./manage.py runserver` to test first). The fix seems to be OK on linux Firefox 13, Opera 11.64, Chromium 6.0 and win IE9 and Safari 5.1.4. The memory usage in browsers is a bit of a problem, because (as far as I know) HTML5 provides no way of reading a fraction of a file, it has to be loaded fully into memory if it is to be sent in chunks to the server. When uploading by a simple upload form, browsers deal with the IO and it should be much more efficient, but one loses the ability to resume the upload, which is particularly interesting for very large files. The best I can think of is to have a cut-off of some 256MB, and upload larger files by FormData or by a simple upload form. Thank you for reporting the bug! Regards, Peter On 06/11/2012 12:35 PM, Kyrylo Shpytsya wrote: > This is probably a question to the developer of Fileshack, but maybe > someone else could provide insight. > > I have managed to setup Fileshack on lighttpd server via fcgi, and it > seems to work more or less ok (although it seems like with Opera > uploading big files causes excessive memory usage). > > My issue is that I cannot upload files containing unicode characters > in names. On different browsers the process fails in different ways, > but none succeed. I have checked that the test server at > fileshackweb.appspot.com does not exhibit this problem, so I assume > this is a problem with my setup. Since the unicode aspect does not > seem to be covered in setup manual for fileshack, I don't really know > where to start at other then diving into the code and trying to debug > it but I hope there is an easier way to that, and also, if I > encountered this problem, someone else might too. > > django process is running with LC_ALL=en_US.UTF-8. > > OS: gentoo x64 > django: v 1.4 > python: 2.72 > sqlite: 3.7.11 > > Thanks, > |