What about saving it as original_filename_thumb?

On Feb 21, 5:03 pm, villas <villa...@gmail.com> wrote:
> I'm having another go at this and have succeeded except for one
> remaining question.
>
> My object is to upload a file and make a thumbnail at the same time.
>
> Say I have a table with two fields MainPic and ThumbPic:
>
> 1. Upload an image to MainPic field
> 2. Get the filename which has been given by system
> 3. Read that file with PIL and make a thumbnail.
> 4. Save it back to uploads dir with a new filename
> 5. Save the new filename in the ThumbPic field
>
> I have managed to do all that.
>
> But, how can I get the system to give me the new filename in step 4?
>
> (At the moment I have to make up the filename myself and that doesn't
> play nice with downloads).
>
> Thanks,  David

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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