that seems a bug. Unless you're forcing it, web2py should save a file in folder/tablename_field.somehash.originalextension
i.e. whatever length the filename originally is, it gets stored with a somewhat "constant" filename length. Can you pack a minimal app to reproduce the issue ? On Saturday, March 16, 2013 5:44:50 PM UTC+1, Loïc wrote: > > I think I have found the problem. It's not a web2py issue but a python > issue on windows : > > in dal.py", line 9228 there is the following line : > dest_file = open(pathfilename, 'wb') > > If the filename is too big, the hash pathfilename length is about 275 > characters > I found a thread on stackoverflow which mentionned that In the Windows API > the maximum path length is limited to 260 characters. > > http://stackoverflow.com/questions/4677234/python-ioerror-exception-when-creating-a-long-file > > So maybe I should reduce the filename length before upload > When I use an 'upload' field, is it possible to automatically rename the > file before upload? > > Le samedi 16 mars 2013 16:56:49 UTC+1, Niphlod a écrit : >> >> if **feels** strange cause file is stored with a computed hash .... did >> you spot the issue on the code while figuring out the name on the disk or >> in the part where the record gets stored in the table ? >> >> On Saturday, March 16, 2013 4:50:41 PM UTC+1, Loïc wrote: >>> >>> After some tries, I discovered that the problem is not in the >>> characters. >>> >>> The problem is the file name length >>> If filename length <= 76 characters it works >>> If filename length *> 76 characters* the *error *ticket is raised... >>> >>> >>> Le samedi 16 mars 2013 16:26:02 UTC+1, LightDot a écrit : >>>> >>>> If you're sure it's the file name, make some test cases, see what fails >>>> exactly and what doesn't... Usual suspects from the file name in question >>>> would be dots, parentheses, dashes, commas, spaces... I don't see any >>>> others. Or perhaps a hidden rogue character, like a space that isn't a >>>> space...? >>>> >>>> Regards, >>>> Ales >>>> >>>> On Saturday, March 16, 2013 4:14:29 PM UTC+1, Loïc wrote: >>>>> >>>>> No, I have created the uploadforder. >>>>> I can upload every files I want, excepted a file which is named *Audi >>>>> A6 Avant 3.0 V6 TDI 240 DPF Quattro Tiptronic S Line (Break) 10_2009, >>>>> Packs >>>>> et options - Cote automobile - autoplus.fr.txt* regardless its content >>>>> >>>>> Le samedi 16 mars 2013 16:00:58 UTC+1, wwwgong a écrit : >>>>>> >>>>>> You forgot to create the uploadfolder >>>>> >>>>> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.