By the way -

The filename in the upload directory was 194 characters --- it's
entirely possible that windows was having trouble with this.

Here is the listing of my test  uploads directory (the first was just
a 'normal' length file):

-rw-r--r--  1 yarko  staff   2642 Jun 24 17:33 test.file.
880c7c46ee30a1ad.696e6465782e68746d6c.html
-rw-r--r--  1 yarko  staff  16624 Jun 24 17:40 test.file.
96aded454eba1b88.5468652050726963696e67206f66204f7074696f6e7320616e6420436f72706f72617465204c696162696c69746965735f4a6f75726e616c206f6620506f6c69746963616c2045636f6e6f6d792e6a7067.jpg
-rw-r--r--  1 yarko  staff  16624 Jun 24 17:45
test.file.a500ba489526de41.5468652050726963696e67206f66204f7074696f6e7320616e6420436f72706f72617465204c696162696c69746965735f4a6f75726e616c206f6620506f6c69746963616c2045636f6e6f6d792e6a7067.jpg


Here's the paths to the links from web2py db admin (as you can see -
all the paths are correctly formed):

http://localhost:8000/test/appadmin/download/db/test.file.880c7c46ee30a1ad.696e6465782e68746d6c.html
http://localhost:8000/test/appadmin/download/db/test.file.96aded454eba1b88.5468652050726963696e67206f66204f7074696f6e7320616e6420436f72706f72617465204c696162696c69746965735f4a6f75726e616c206f6620506f6c69746963616c2045636f6e6f6d792e6a7067.jpg
http://localhost:8000/test/appadmin/download/db/test.file.a500ba489526de41.5468652050726963696e67206f66204f7074696f6e7320616e6420436f72706f72617465204c696162696c69746965735f4a6f75726e616c206f6620506f6c69746963616c2045636f6e6f6d792e6a7067.jpg



Regards,
- Yarko

On Jun 23, 3:15 am, Swell <[email protected]> wrote:
> Ok
> I will post some code here to show as much as possible
>
> here is the db definition:
>
> db.define_table('papers',
>   Field('title','string'),
>   Field('author','string'),
>   Field('file','upload'),
>   )
>
> then if i try to use the database administration tool available in
> Models section and try to insert a file like
> "The Pricing of Options and Corporate Liabilities_Journal of Political
> Economy.pdf" i then get a ticket complaining about
>
> IOError: [Errno 2] No such file or directory:
> C:\\Users\\M\\Desktop\\web2py_src\\web2py\\applications\\Library/
> databases\\..\\uploads\
> \papers.file.a33b16f5af29f6d8.5468652050726963696e67206f66204f7074696f6e7320616e6420436f72706f72617465204c696162696c69746965735f4a6f75726e616c206f6620506f6c69746963616c2045636f6e6f6d792e706466.pdf'
>
> i also checked the file actually has never been properly uploaded ( it
> is not present in the upload directory). Nothing special about size of
> the file ( if i just  change manually the filename it works ). So it
> seems that the bug is when we receiving the file .
>
> hope we can sort this out
> Thx all
> M

Reply via email to