Thank you Val, I will try the custom_store, custom_retrieve out! Besides, i have also raise a ticket to pyDal at below https://github.com/web2py/pydal/issues/502
On Sunday, 26 November 2017 00:58:36 UTC+8, Val K wrote: > > I had related issue - I tried to stream (response.stream) file with > unicode filename - unsuccessfully (CentOS) > Upload field has custom_store/custom_retrieve args - > https://groups.google.com/forum/#!topic/web2py/8X-QlbtyxEQ > try to use it > > On Saturday, November 25, 2017 at 7:55:17 AM UTC+3, Yangbo Xu wrote: >> >> Anyone has any suggestion on some workaround? >> Thanks in advance! >> >> Yangbo >> >> On Saturday, 18 November 2017 12:09:55 UTC+8, Yangbo Xu wrote: >>> >>> Hello, >>> >>> >>> I have a question regarding how Pydal can accept remote filesystem thru >>> pyfilesystem. >>> >>> According to the web2py documentation >>> >>> >>> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor >>> >>> I need to put uploadfs = # pyfilesystem object in field definition. >>> >>> >>> >>> After doing so, at upload, pyfilesystem complains that “*paths must be >>> unicode (not str)”* >>> >>> >>> The source code for pyfilesystem is here (*search for "def >>> validatepath"*) >>> >>> https://github.com/PyFilesystem/pyfilesystem2/blob/master/fs/base.py >>> >>> >>> >>> So I conclude pydal pass file path in python2 byte string, and >>> pyfilesystem only accepts Unicode in python2. >>> >>> >>> >>> Do you have any suggestion/workaround for this issue? >>> >>> Thanks in advance. >>> >>> -- 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. For more options, visit https://groups.google.com/d/optout.