Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Store Uploaded file in Links DB

Quote Reply
Store Uploaded file in Links DB
I allow the user to attach an image to the submitted link; however, the image goes into a local directory that I specified when I created the image field in links properties.
However, and since I am allowed to use more DB space(2000MB) then to user site home directory (500MB), then I would like to store the images in the links sql db!!
Therefore:

1. can I change the directory of the attachements from: /html_files/cars/images/ to something like: /home/local/sql/DBs/data/my_domain/ so the files can be stored in the sql db instead in of the local directory...???

2. If so, will I have problem accessing these images... (do I need to connect to db to see them every time I want to access them)????

thank you much..
Quote Reply
Re: [Mark2] Store Uploaded file in Links DB In reply to
Hi,

The only way I know of doing this, is to "decode" the image, using something like base64. However, I seriously wouldn't recommend this.. as it would mean you'd need to decode it (i.e convert it into the image) each time its called.. which is a hell of a lot more work for your server (and likely to get your hosting account closed down :P), compared to just showing a static gif/jpg etc =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Store Uploaded file in Links DB In reply to
Thanks Andy for the info. From what I understand that all attachements (any type of file) will reside on the directory you specify and will not be stored in the DB, but this can easly consume the entire space of the site.
I was just wondering if attachments can be stored in the DB instead in the local directory????
e.g. like google and picture gallerays store images in a database and not on local directory is that right??
Quote Reply
Re: [Mark2] Store Uploaded file in Links DB In reply to
Hi,

Quote:
I was just wondering if attachments can be stored in the DB instead in the local directory????
e.g. like google and picture gallerays store images in a database and not on local directory is that right??
Erm, thats what I tried explaining above :P

The short answer.. no. At least not unless you have a hell of a server, and quite a bit of programming knowledge =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Mark2] Store Uploaded file in Links DB In reply to
The images can be stored as blobs in the MySQL system.

The only question is, if LSQL supports this feature, or not?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...