You can pass two optional arguments to Field(...)

custom_store  and custom_retrieve

the first must be a function that takes a file like object, a
filename, and an optional path (uploadfolder) stores the file where
you like and returns the filename you assign to the file (can be the
original one)

custom_retrieve instead takes a filename and a path (uploadfolder) and
return the file content.

Massimo

On Jan 17, 8:36 am, grezly <[email protected]> wrote:
> I'd like to change the default behaviour for one app, concerning my
> uploads. Web2py normally rename the uploaded file, but in my
> particular case, web2py doesn't need to change my filename.
>
> Is something possible, while creating my model?
>
> Next to that i also like to store a hash of a file in my database.
> With the standard crud i can't change this behaviour.
> I also can't find such a functionality right now in web2py/crud, or
> did i miss something?

Reply via email to