I have a DB table which stores information for an image upload and a 
corresponding thumbnail image file. The table is defined something like 
this:

db.define_table('t_image',
    ...   
    Field('f_image', type='upload',                       # image field
        uploadfolder=os_path_join(request.folder,'uploads'),
        uploadseparate=True, autodelete=True, label=T('File')),
    Field('f_image_thumb', type='upload',                 # thumbnail field
            uploadfolder=os_path_join(request.folder,'uploads'),
            uploadseparate=True, autodelete=True,
            compute=lambda row: SMARTHUMB('t_image',
            image = row.f_image, box = (400, 400),
            upload_folder = 'uploads',
            request = request)),
    ...)

The image corresponding to the 'f_image' field is uploaded to a folder 
called '.../uploads/t_image.f_image/[first two letters of filename]', as it 
should be. However, the thumbnail is created in a folder called 
'.../uploads/t_image.thumbnail/[first two letters of filename]' - instead, 
I would like it to go to a folder called 
".../uploads/t_image.f_image_thumb/...", 
corresponding to the name of the db table and the name of the field.

Is there a way to get the thumbnail to go to a folder named 
'[tablename][period][fieldname]' instead of '[tablename][period]thumbnail'? 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to