Gossamer Forum
Home : Products : Gossamer Links : Discussions :

File Upload

(Page 2 of 2)
> >
Quote Reply
Re: [Aki] File Upload In reply to
Doh!

I fixed it...I was using the id from the Links_Files table rather than the Links table.

Thanks for being patient Blush
Quote Reply
Re: [Paul] File Upload In reply to
Quote:
Thanks for being patient Blush
Thanks for being doctor.
Quote Reply
Re: [Aki] File Upload In reply to
Guys, I'm using the SIMPLE Method to save images, however I can NOT reference the images because they get a number appended to the name, like this:

If I try to save the image file:

winter.gif

if I search for it in the file system it says

xx-winter.gif where xx is a number why is this happening?
Quote Reply
Re: [jaltuve] File Upload In reply to
The XX is so that two images both named winter.gif won't collide and write over each other. By using a global like this, you can get the relative path:

Code:
sub {
my $tbl = $DB->table( "Links" );
my $fi = $tbl->file_info( "COLUMNNAME", IDNUMBER );
$fi->File_RelativePath;
}

Then you can prefix the URL to the base image directory or use it within your code and prefix it to the upload directory to get the direct path to the file.
> >