> 1) Is there an easy way to "overload" the default behavior of the
> SQLFORM so it stores the filename in the database, instead of encoding
> it in the renamed-file? I see the Field class has a custom_store/
> retrieve variable, could I just duplicate the default DAL store/
> retrieve functions and add my extra file name logic? Or is there a
> better way?
One thing you can do it is
Field('name','upload',length=260)
it will truncate the generated filename to 260. That means it will not
be able to reconstruct the full original name but only part of it.
Anyway, give it a try and let us know.
> 2) Is there any way for web2py to better identify this exception? I
> could imagine some people scratching their heads for a quite a while
> on it.
Python raises an IOError. This could have many possible causes. I
changed the code in trunk to re-raise the exception with more info.
Check if this is acceptable.
Massimo