Gossamer Forum
Home : Products : Gossamer Links : Discussions :

File Upload

Quote Reply
File Upload
   
Hi,

I came here looking for how to let uses upload 1 photo with their link, and I think I found most of what I need in another post by Andy that I pasted below, but I was wondering if anyone figured out a way of having Links SQL automatically resize the photo they upload? Thanks for any help.


Quote:
I thought I'd post this as a bit of help, for those who are struggling with file uploads :) (this example is for images, gif/jpg/png);

Quote:
Column Name: Image1
Column Type: CHAR
Column Size: 255
Not Null: No

Form Information

Form Display: Image 1
Form Type: FILE
File Save Location: /full/path/to/where/images/should/be/saved
File Save URL: http://www.domain.com/full/location/where/images/should/be/saved/
File Save Method: HASHED
File Maximum Size: 250000
Form Regex : ^([%\w-]+\.(?:jpe?g|JPE?G|gif|GIF|png|PNG)|)$


You also need to add something like this in include_form.html;


<div class="row clear">
<label for="Image1" class="name">Image:</label>
<div class="value">
<input type="file" name="Image1" class="text">
</div>
</div>
Quote Reply
Re: [shimmy1] File Upload In reply to
There's nothing built-in to do the resizing automatically. However, I believe that Andy might have a plugin to do that.

Adrian
Quote Reply
Re: [shimmy1] File Upload In reply to
Hello,

I just followed the instructions I pasted above, and I can't get it to work. The file won't save to the file path I set. I tripled checked and it is correct and I chmod the folder to 777
Quote Reply
Re: [shimmy1] File Upload In reply to
Hi,

I had the same problem before. I changed the file saved method to simple, then it's working.

Hope that helps!

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] File Upload In reply to
Hi I just tried chaninging it simple, but it still does not work for me. Can you think of any other reasons?
Quote Reply
Re: [shimmy1] File Upload In reply to
I am not sure. Please just try to add a link in admin to see if it's working.

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] File Upload In reply to
Hi, yes it does work when I add from the admin panel.

I'm using this in the include_form...

<tr><td valign="top"><%body_font%>Image: </font></td>
<td>
<input type="file" name="Image" >
</td></tr>

Any ideas why it doesn't upload on their end?

Thanks
Quote Reply
Re: [shimmy1] File Upload In reply to
Check that the <form> tag includes:

enctype="multipart/form-data"
Quote Reply
Re: [brewt] File Upload In reply to
>> I believe that Andy might have a plugin to do that.

Yeah, we do :)

And I'm getting ready to release a bunch of updates, and upgrades, on the various image stuff. I have the new features working, but packing it into a plugin is more challenging.

There will be several versions of the upload, from just a logo, to adding image(s) to links and to profiles (that program is on the way too).

Once I get the beta site opened, I'll have more time to package each individual part. I've been writing it as a series of plugins, or potential plugins, and since most don't use "hooks" any more (they call functions from within the templates, when needed) there is a lot less slowdown it seems.

Stay tuned, I know it's slow going, but I'm trying to plug up all holes, make room for (or add in) all features I can think of, and make sure the code won't lock you in to something that will hold your site back in the future.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.