This is a complex issue. The length of a filename is limited to 200
chars + extension.

There is no way to limit the length of path+filename since the path
depends on where web2py is installed and it outside web2py control.
Even we were to limit len(filename) to 1 character, this function may
still fail if len(path+filename)>255. I say this is a major windows
bug.

Massimo

On Aug 23, 5:11 am, Sw1 <swel...@gmail.com> wrote:
> Hi,
>   I posted some time ago a problem related to uploading a file with a
> very long filename under window ( it crashes ). I have been able to
> spot that the issue is in sql.py around line 2799( function store ).
> So the pb is related to the python interpreter under win32 that
> doesn't allow the creation of a file descriptor when the path+filename
> is longer than 255 ( the ntfs filesystem does allow this but it seems
> to be related to the way python handle it)
>
> I don't really know what to do here but may i suggest to change the
> naming scheme so that generated filename is shorter ( something
> containing only a uuid and not the encoded part of the filename).
>
> Cheers,

Reply via email to