There is one issue with my solution.

If you upload a file filename.abc, it is internally renamed as lots-of-
junk--filename.abc
and you can download it with
http://..../download/lots-of-junk--filename.abc
It works on GAE too.

The problem is that URLs are validated hence filename.abc must be
sanitized. I sanitize by replacing any alphanumeric char in filename
with one underscore. This is fine for english files. This is not fine
with filenames with foreign charsets (like chinese).

I could replace lots-of-junk--[encoded filename].abc but this may open
a big can of worms. If the original file contains special chars, what
is the encoding? What if the downloader does not support those chars
in the filenames?

Any advice?

Massimo


On Apr 28, 8:48 am, bsnipes <snipes.br...@gmail.com> wrote:
> WooHoo!  Now I can ditch my workaround...
>
> Brian
>
> On Apr 28, 12:23 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > SQLField('fieldname','upload',length='256',rememberfilename=True)
>
> > Do I need to say more?
>
> > Just try with appadmin (requires appadmin from trunk)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to