I haven't written any download function yet but yes i was planning to use the download function available in the controller. I was just checking in the table by database administration.
is upload subdirectory is not the same subdirectory i am storing my file into?? I am storing the file in web2py/applications/uploads/scripts. I am creating this scripts folder inside uploads folder an dstoring my files into that. On Monday, June 5, 2017 at 11:29:34 PM UTC+5:30, Dave S wrote: > > > > On Monday, June 5, 2017 at 6:18:06 AM UTC-7, [email protected] wrote: >> >> Hello everyone, >> I am creating a file named hello_world.py somehow >> and storing that file in location >> some_dir/web2py/application/uploads/scripts. I want to give option to >> user to download that file. >> >> Technique i am using is: >> I created a table with a filed having type upload as: >> db.define_table('scripts', >> Field('s', >> 'upload',uploadfolder='/var/www/web2py/applications/uploads/scripts'), >> >> > > What does your controller look like for downloading the file? If you use > the download() controller from the sample app, it expects the file to be > in the uploads subdirectory. > > /dps > > and i am storing the file path > /var/www/web2py/applications/upload/scripts/hello_world.py >> in field 's'. >> >> By doing this there is an entry in database, but when i am clicking on >> field 's' of table i am getting error '404 file not found'. >> >> Can somebody help me with this or suggest me better option to solve the >> problem. >> >> >> >> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

