It is no need to use different code for win/linux, since it is Python! There is os.path.normpath(your_path) that does all stuff with slashes, I have app that works on both platforms just fine (without platform checking at all) My way - always use '/' in path, and at the end of all manipulations performs normalisation: path = os.path.normpath(path) And keep in mind that os.path.join() also works with filenames, so you can just os.path.join('foo', 'bar', 'baz.thumbnail.jpg')
On Wednesday, August 28, 2019 at 9:05:11 PM UTC+3, Rahul wrote: > > Hi Dave, > > upload_pic is the form variable that user specifies for uploading the file > from local disk. Basically it is the filename. I removed the braces for > outfile = (thumbpath) > but this is still not working. Any more suggestions ? > > > Regards > Rahul > > On Tuesday, August 27, 2019 at 2:21:45 PM UTC+5:30, Rahul wrote: >> >> Hey Dave, >> I was facing issues with path storage in a db field so I >> started using this method. I dont need outfiles curly braces will revisit >> the code today if possible and get back with the details. This is my >> modified code, previous one was straight forward and streamlined code and >> was using simple code.Thanks for the questions I’ll try getting in details. >> >> Regards, >> >> Rahul > > -- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/52d6b81a-a04a-4ef7-b2e4-9bf08b5ac325%40googlegroups.com.