Gossamer Forum
Home : Products : Gossamer Links : Discussions :

[EXAMPLE] Image upload help.. using FILE types

(Page 2 of 2)
> >
Quote Reply
Re: [brewt] [EXAMPLE] Image upload help.. using FILE types In reply to
is it worth it to upgrade? what new features have been added.

do i need to make any changes to the templates?

Last edited by:

theguy: Apr 1, 2006, 1:42 AM
Quote Reply
Re: [Andy] [EXAMPLE] Image upload help.. using FILE types In reply to
it's working just fine but i noticed it's got a minor error when someome upload a file name
"my photo" notice the space it gives me an error and i can not upload it and it works if the file name is one word like myphoto or my_photo
can this be fixed?

In Reply To:
Hi,

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>

Hope that helps anyone whos looking at adding image uploads in GLinks 3.0.x Smile

Cheers
Quote Reply
Re: [theguy] [EXAMPLE] Image upload help.. using FILE types In reply to
In Reply To:
it's working just fine but i noticed it's got a minor error when someome upload a file name
"my photo" notice the space it gives me an error and i can not upload it and it works if the file name is one word like myphoto or my_photo
can this be fixed?

This is an old issue
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=261760#261760


Maybe you could fix it with regex ^(?:|[\w-\.]+\.(?i:jpg|jpeg|jpe|gif))$
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=292255#292255


Quote Reply
Re: [Andy] [EXAMPLE] Image upload help.. using FILE types In reply to
In Reply To:
Hi,

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>


Hope that helps anyone whos looking at adding image uploads in GLinks 3.0.x Smile

Cheers



File Maximum Size: 250000 will not work on the modify form - it will allow you to upload file which size exceeds the value in File Maximum Size

And when you validate changes in admin, admin will notify you that file size is bigger than allowed.

This is a very old bug

Check here http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=266247#266247

And be sure to read the next post Crazy

Sometime I really do not understand GT policy on bugs. We help them to find/correct bugs, we take the time to report hem and what they do - fix only one version.

Maybe they should have some kind of bug reporting interface or something like that.
Quote Reply
Re: [Payooo] [EXAMPLE] Image upload help.. using FILE types In reply to
nope that did not solve the problem the file name should be one word otherwise it would not work
Quote Reply
Re: [Payooo] [EXAMPLE] Image upload help.. using FILE types In reply to
In Reply To:
File Maximum Size: 250000 will not work on the modify form - it will allow you to upload file which size exceeds the value in File Maximum Size
I just tested this on GLinks 3.1.0, and it works fine.

Adrian
Quote Reply
Re: [brewt] [EXAMPLE] Image upload help.. using FILE types In reply to
In Reply To:
In Reply To:
File Maximum Size: 250000 will not work on the modify form - it will allow you to upload file which size exceeds the value in File Maximum Size

I just tested this on GLinks 3.1.0, and it works fine.

How did you tested this?
I also run 3.1.0 and it does not work fine Crazy
Place upload file field on mofify form, not just through admin...
Quote Reply
Re: [brewt] [EXAMPLE] Image upload help.. using FILE types In reply to
Hi brewt,

What do you (GT) think about:

"Sometime I really do not understand GT policy on bugs. We help them to find/correct bugs, we take the time to report hem and what they do - fix only one version.

Maybe they should have some kind of bug reporting interface or something like that."

Quote Reply
Re: [Payooo] [EXAMPLE] Image upload help.. using FILE types In reply to
Oops, my installation had user_direct_mod enabled. I've posted an update that fixes the file check problem.

Adrian
Quote Reply
Re: [Payooo] [EXAMPLE] Image upload help.. using FILE types In reply to
In Reply To:
"Sometime I really do not understand GT policy on bugs. We help them to find/correct bugs, we take the time to report hem and what they do - fix only one version.
That post was reporting the problem that the regex wasn't being checked and that was fixed and has been fixed ever since Links SQL 2.2.0. I'm not sure why you would say that it was only fixed in one version. The file size check problem is a separate bug (that wasn't reported in that thread).

In Reply To:
Maybe they should have some kind of bug reporting interface or something like that."
I believe that an extra interface for bug reporting would make things more complicated for most users; especially since using the forum for bug reports has been working well.

Adrian

Last edited by:

brewt: Jun 25, 2006, 2:32 AM
> >