I reed all in online book about upload and forms... Can I make my upload manually, something like: brows_file -> upload_to_some_folder. What is happening after I submit button 'upload' - can I have control on this activity.
I'm new with Web2Py and Python, but on PHP this is no problem, I make all my code upload form and files go to folders what I chose, and file name is my will same or changed... In Python I see some functions os.rename for renaming files, but it is directly rename file name. Can I have may custom upload form with two way first: sending file to folder - no need for database second: sending data to database - and don'n need to know is file or something else. On download process I can us something like list folder content and make links for download (from file list and database data I will generate links for download) If you have doubts why so complicated, and why I don't use simply way shown in book -> answer is: the chairman of department what that files stored as early mentioned... Miroslav On Nov 19, 12:40 am, Anthony <abasta...@gmail.com> wrote: > On Friday, November 18, 2011 5:55:59 PM UTC-5, miroslavgojic wrote: > > > some questions: > > > Can I turnoff default changing name with upload function? > > I don't think so. As an alternative, process the form with dbio=False so it > doesn't do the upload or database insert, and then manually process the > upload however you want and store your filename in the db. > Seehttp://web2py.com/book/default/chapter/07#SQLFORM-without-database-IO. > > Anthony