Gossamer Forum
Home : Products : Gossamer Links : Discussions :

another newbie question!

Quote Reply
another newbie question!
Trying to follow the tutorial in the manual to add the ability to upload images.

Firstly the manual seems to be a touch out of date - there is an additional field for File Save URL which is not shown or mentioned in the guide - I assume though that this is the real url of the images location.

Thats one of my problems I dont know where to specify them to be saved. The example uses lsql/files/images - I could use this I suppose but I then do not know the real URL for this entry.

On trying to submit the new column I got two error messages reported
  • Size '' is invalid. It must be between 1 and 255.
  • File Save Location does not exist or is not writeable.


  • The example showed a file size of 5000000 yet if you go over 255 it is an error??

    The guide also does not tell you which table to create the new images column in, I assumed it was the Links one - is this correct?

    Any help would be appreciated please.

    Cliff
    Quote Reply
    Re: [Fazzer] another newbie question! In reply to
    The size error means that you need to define the field type as a CHAR, and 255.

    The second error means that you didn't define a path to save the files to. For example;

    File Save Location: http://www.site.com/images/
    File Save Path: /home/site.com/public_html/images/

    Hope that helps.

    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: [Fazzer] another newbie question! In reply to
    Firstly the table that you choose to put the images in depends where you want them displayed. If you are intending to display an uploaded image in the description of a link then you need the extra column in the Links table.

    Second, the size variable it is complaining about is not the size of the uploaded file - it is the maximum length of the name of the file.

    You need to just choose a directory where you want the files to be saved. If it doesn't already exist then you will need to create it and make it writeable.

    It is some time since I've looked at displaying uploaded images, but I think that you will need a global to display the file unless you use jump.cgi - I'm not sure whether this is explained in the docs but there are plenty of threads about this in the forum.

    Edit: Take too long with your reply and someone gets there before you Tongue

    Last edited by:

    afinlr: Jul 3, 2003, 6:00 AM
    Quote Reply
    Re: [afinlr] another newbie question! In reply to
    >>>Edit: Take too long with your reply and someone gets there before you <<<

    Tongue

    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] another newbie question! In reply to
    OK got this working now on the admin side - thanks to both of you for pointing me in the right direction Smile

    Last bit I don't follow in the guide is the section on altering the include_form.html so that users can upload/view images.

    the instructions tell you to add the following to the <%FORM%> tag:

    ENCTYPE="multipart/form-data"

    and

    <%INPUT TYPE="FILE" NAME="Image"%>

    I have had a look and am not sure at all where these should be added - any ideas?

    Cliff
    Quote Reply
    Re: [Fazzer] another newbie question! In reply to
    You need;

    <INPUT TYPE="FILE" NAME="Field_Name">

    Its not a tag (i.e no %% tags)

    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] another newbie question! In reply to
    Hi Andy

    Thanks for your speedy response to my questions Wink

    What about the ENCTYPE="multipart/form-data" statement - do you know where that needs to go?

    I can see that adding the input type statement to the include_form.html page will allow users to upload an image - not tested yet!

    I dont see how the uploaded image will be presented in the link on the page since the instructions do not tell you what needs to be changed in the files where the users view the links with images???

    Cliff
    Quote Reply
    Re: [Fazzer] another newbie question! In reply to
    You need to put it in the <FORM .. > part...

    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!