web2py does not like these urls: www.somedomain.com/abcd%2Bfdf.jpg <http://www.google.com/url?q=http%3A%2F%2Fwww.somedomain.com%2Fabcd%252Bfdf.jpg&sa=D&sntz=1&usg=AFQjCNGhIM-oma8uJzKUwhBvqLi9CuobUQ> The easiest solution is to change the file name.
of you can try this: 1) in default.py define def download2(): reqest.args = [request.get_vars.filename] 2) and in routes.py routes_in = [('$app/default/download/$anything',' $app/default/download2?filename=$anything')] On Friday, 25 July 2014 01:14:47 UTC-5, kenny c wrote: > > I am currently working on generating a jpg file and the filename contains > special characters in it. > > when the link to image file is "www.somedomain.com/abcd%2Bfdf.jpg > <http://www.google.com/url?q=http%3A%2F%2Fwww.somedomain.com%2Fabcd%252Bfdf.jpg&sa=D&sntz=1&usg=AFQjCNGhIM-oma8uJzKUwhBvqLi9CuobUQ>" > > It gives "invalid request" error. > > I am currently using "request.args" to read the filename. > > I tried to understand routes.py but I didn't know how it should be > configured. Thank you. > -- 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.