Front Page file Upload and view

How do I let someone via the internet upload a specific type of file to my website. What I would like to do is have a person go to a page. They could then upload a picture by using the browser. When that is done the picture will be displayed on another page along with all of the other pictures that were upload. I would also like for them to upload stories instead of pictures or upload them both. I of course would like to be able to edit all pictures and text being displayed. Can this be done with FP?
dome74Asked:
Who is Participating?
 
ClassyLinksConnect With a Mentor Commented:
Hi dome74.  Welcome to EE.  I know you will find it a useful resource, as I do.

As for your question:

It cannot be done with any of the wizards in FP, but ANYTHING can be done if you are willing to work in HTML mode.

You can do a file upload with a simple form  <input type="file"> tag.  However, you will need to enable WRITE permissions and the ability to upload that file to a certain directory.

The part where you would like it to display on another page along with all the other pictures...I'm inferring from this that you would like to have the pictures display automatically.  And the stories as well.

This can be done with ASP.  So can the editing.  What happens is that we store everything in a database (actually, we only store the image paths in the database, the actual image is in the directory) and then call it using the response.write function of ASP.

If your server supports ASP, I'd be glad to help walk you through this.  Also, you should investigate which UPLOAD utility your server has installed.  The script for each one differs slightly.

If you don't have access to ASP, which is MY preferred method of operation, there is probably a CGI/PERL program that can do this....but I'd have to go hunting for it.
0
 
ClassyLinksCommented:
Dome...are you there?
0
 
ClassyLinksCommented:
Dome, please return and let me know if there is anything else you need to complete this question.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
ClassyLinksCommented:
Dome74, please return and let me know how you are making out.  I cannot provide assistance if I do not know what has already worked for you and what has not.
0
 
modderCommented:
Dome74,

You seem to be experiencing some difficulty with this site.

Experts-Exchange is not a news group, in which you can post a question, get the answer, and walk away, or ignore any posts that do not serve to solve your problem.

You can read more about how the site works in our member agreement: http://experts-exchange.com/jsp/infoMemberAgreement.jsp

Although the agreement tells you something about how the site works, it doesn't tell you much about the netiquette that has evolved on our site. In Experts-Exchange it is expected that you always provide feeback to those who participate in the questions that you post. And I'll explain why this is the case.

When a question is resolved, it becomes a Previously Answered Question, and will be stored in the database. Users who have similar problems can buy your question for 1/10 of the original point value in order to find a solution to *their* problem.

A a result it is important that you provide feedback to our experts. If their suggestions do not work, tell them why. If they do, award them by grading the answer so that the question does indeed become such a "PAQ".

That way future visitors of this question get the most out of it.

I would also like you to consider this: Our experts are willing to spend some of their precious time to help you solve your problem. A lot of our experts are professionals, to whom time is money. And they're willingly giving up some of their time to help you.

And the only thing we're asking in return is a bit of feedback and an effort on your behalf to participate according to our member agreement and our peculiar brand of netiquette. I think that is a pretty good deal, don't you?

modder
Community Support
0
 
ClassyLinksCommented:
modder...please delete.

Thanks.
0
 
dome74Author Commented:
I'm sorry my computer was down. I just got it back again. I'm sorry for the delay.
0
 
dome74Author Commented:
I would like for you to help me if you are interested still.
I will find out what upload software the servers have.
Steve
info@midwestmtb.com
0
 
ClassyLinksCommented:
Still willing Steve.....but you need to keep the thread alive by posting a response to all of the suggestions you receive.

I'll wait to hear from you about the upload components you can use.

8-)
0
 
dome74Author Commented:
Here is what I found out:


         Hi,

         We don't provide software for that... you need to provide your own
scripts
         to provide that on your web site.

         Peter

At 08:29 PM 8/20/2001 -0400, you wrote:
>What  'upload' software do you have on your servers? I need to allow a web
>based file upload on my site for pictures. No *.exe will be allowed only
>*.jpg's so there is no worry of virus. I'm needing this for my site
>www.midwestmountainbiker.com.
>
>Thanks
>Stephen Martin

0
 
ClassyLinksCommented:
Well, that is both good & bad news.

Here's a cgi form that will do the trick for you....

http://www.terminalp.com/cgi-bin/dc.pl?url=/uploadtest.html

And here is a JavaScript alternative...

http://javascript.internet.com/forms/upload-filter.html

Let me know if these do not meet your needs.

8-)
0
 
dome74Author Commented:
Ok know how do I get it to pull up on a page after it is uploaded?
0
 
ClassyLinksCommented:
If you know the name of the file....

www.yourweb.com/directoryname/filename.jpg

Otherwise, you'd have to save the file name to a database or other variable and pull it up that way.  I use ASP for this.
0
 
dome74Author Commented:
How do I do this with CGI. I'm upgrading my account to have cgi
0
 
ClassyLinksCommented:
0
 
ClassyLinksCommented:
dome....are you there?
0
 
dome74Author Commented:
I looked at the page but either I'm stupid because I don't know what to look for. There is no directions. What should I look for?

0
 
ClassyLinksCommented:
You're not stupid!

Looks like they've removed the link to the code.  Not making life easy, are they?

Have you tried this script?


<!-- TWO STEPS TO INSTALL UPLOAD FILTER:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  ArjoGod, Shauna Merritt -->
<!-- Modified By:  Ronnie T. Moore, Editor -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
extArray = new Array(".gif", ".jpg", ".png");
function LimitAttach(form, file) {
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) form.submit();
else
alert("Please only upload files that end in types:  "
+ (extArray.join("  ")) + "\nPlease select a new "
+ "file to upload and submit again.");
}
//  End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<center>
Please upload only images that end in:  
<script>
document.write(extArray.join("  "));
</script>
<p>

<form method=post name=upform action="/cgi-bin/some-script.cgi" enctype="multipart/form-data">
<input type=file name=uploadfile>
<p>
<input type=button name="Submit" value="Submit" onclick="LimitAttach(this.form, this.form.uploadfile.value)">
</form>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  1.55 KB -->
0
 
dome74Author Commented:
Ok I did that and I get an internal server error when I try to upload something ( I changed some-script.cgi to pictures.cgi ( I have a pictures.cgi in my cgi bin) that was all I did. Can you look at my page and see if you see anything?
http://www.midwestmountainbikers.com/pictures.htm

Thanks
0
 
dome74Author Commented:
0
 
ClassyLinksCommented:
The server is saying it cannot find this page:

http://www.midwestmountainbiker.com/public_html/cgi_bin/pictures.cgi
0
 
dome74Author Commented:
Just to make sure I'm doing this right. All I have o do is name an empty text file pictures.cgi and place that in my cgi-bin. Do I need to put any code in the pictures.cgi?

I'm sorry this is taking so long. I uped the points.
0
 
ClassyLinksCommented:
Are you using the javascript above?

But Wait!

I just found this...looks like it is just what you are looking for:

http://www.shavenferret.com/scripts/picpost/

Here is a whole list of them:

http://cgi.resourceindex.com/Programs_and_Scripts/Perl/Image_Display/Picture_Posts/
0
 
ClassyLinksCommented:
Just as a point of interest:

visit http://mysite.classylinks.ca/_sitepages/pictures and you will see how I've done it as a demo for potential clients.  Mine is ASP though.
0
 
ClassyLinksCommented:
How's it going dome74?
0
 
dome74Author Commented:
Well I can't get it to work. I believe it is a problem with my host. I appreciate all of the help you have given me.

Thanks for all of your help you have given me.
0
 
dome74Author Commented:
He was very helpful in getting me the answer. I will love to have 'ClassyLinks' help me in the future.
0
 
ClassyLinksCommented:
Glad to help dome....I'm usually here.  However, you missed the S....it's she  ;-)  LOL

See you next time!
0
 
dome74Author Commented:
Sorry :}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.