Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Attach a file

Quote Reply
Attach a file
Hi,

In the Links.pm


# FILE UPLOADS
# ---------------------------------------------------
# If you specify a directory here, Links SQL will have built in
# support for file uploads. Note, changing the path at a later date,
# requires you to recreate the .def files using setup.cgi.
$LINKS{attach_dir} = "";

# Path to where temporary files are stored - this holds files that have
# been uploaded by users, but not yet validated.
$LINKS{temp_attach_dir} = "";

# You can also attach files to the user table if you like.
$LINKS{user_attach_dir} = "";

How can you set this up? Using: http://domain.com/attach or URI? I try both and it won't work. Help!



Quote Reply
Re: Attach a file In reply to
Hi mrcry11
the upload function is a little buggy in Version 1.11. But all the fixes are posted in this forum.

Bug 1: Def files are not written propperly when resync'ing with admin

Bug 2: When validating the files are not renamed / inserted correctly in the attachement table.

As for the paths, they have to be absolute. Dont use the URL's.

Procedure to set up the attachements.

1. Correct the bugs in the cgi's
2. Insert the paths in Links.pm
3. Run setup.cgi and create the tables
( cklick on create tables) you don't have to drop them first. There will be some errors (about tables already existing - never mind)

hope it helps,

regards, alexander

Quote Reply
Re: Attach a file In reply to
This should be very well fixed in the next release, since the MySQLMan program does file upload/download very well at this point.

Seems GT is working out various problems in different software products, then bringing them all together into their core "GT" modules and then application specific (override) modules.

Once this is implemented in a standardized, non buggy way, I have some image manipulation routines I'll add in (if that is not part of the new package.) Things to create thumbnails based on the directory uploaded to, and grab the image size/dimensions for inclusion in the links record.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/