Awesome thanks.
On Sun, Dec 12, 2010 at 10:25:25AM -0800, weheh spake:
> If uploadseparate=True then you have to reconstruct the full path with
> a routine like this:
>
>
> def get_path(filename,folder='uploads'):
> """Get full path to file stored in uploads"""
> f=filename.split('.')
> path=os.path.join(request.folder,folder,
> '%s.%s'%(f[0],f[1]),
> '%c%c'%(f[2][0],f[2][1]),
> filename)
> return path
>
> where filename passed to get_path is db.mytable[row].file_fieldname
>
> On Dec 12, 1:07 pm, "G. Clifford Williams" <[email protected]>
> wrote:
> > Is ther a prescribed mechanism for getting the full path to uploaded files?
> >
> > I've got an onaccept function that contains:
> > os.symlink(os.path.join(request.folder,'uploads',
> > form.vars.file_newfilename), link_path)
> >
> > which worked until I'd changed the field to use 'uploadseparate=True'
> >
> > Thanks in advance
> > --Cliff