No. For uploads stored on filesystem it always returned (filename, fullfilename). For other types of uploads it returned (filename, stream).
We tried to change this and return always consistently (filename, stream). There was only one trunk version that did that. It was reverted because of caching concerns. The current trunk version is another experiment. These are tests. This is not the standard behavior. I am glad it now works as you expect but it not decided it is going to stay this way until we clear all issues. On Sunday, 10 March 2013 18:25:02 UTC-5, Alex wrote: > > I guess you meant to say it always returned a stream instead of the file > name in your reply above (and not the other way around)? > > I just saw your recent commit and it works fine again, the retrieve method > now returns a stream as excepted. thanks! > > Am Sonntag, 10. März 2013 23:40:39 UTC+1 schrieb Massimo Di Pierro: >> >> Can you check is the current trunk works for you? We are trying to >> improve the APIs of retrieve. >> >> On Sunday, 10 March 2013 13:58:23 UTC-5, Alex wrote: >>> >>> I'm currently using web2py 2.1.1 and wanted to try 2.4.2 but I got a >>> problem with retrieving uploaded files from the file system. I'm using the >>> retrieve method of the upload field. >>> The problem is in dal.py line 9265 where it returns the file path >>> instead of the stream. >>> stream = pjoin(file_properties['path'], name) >>> previously this was >>> stream = open(pjoin(file_properties['path'], name), 'rb') >>> >>> now my code does not work anymore. I assume the missing open call is a >>> bug, right? >>> >>> Alex >>> >>> -- --- 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/groups/opt_out.