Link to home
Start Free TrialLog in
Avatar of dome74
dome74

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of ClassyLinks
ClassyLinks
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dome...are you there?
Dome, please return and let me know if there is anything else you need to complete this question.
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.
Avatar of modder
modder

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: https://www.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
modder...please delete.

Thanks.
Avatar of dome74

ASKER

I'm sorry my computer was down. I just got it back again. I'm sorry for the delay.
Avatar of dome74

ASKER

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
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-)
Avatar of dome74

ASKER

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

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-)
Avatar of dome74

ASKER

Ok know how do I get it to pull up on a page after it is uploaded?
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.
Avatar of dome74

ASKER

How do I do this with CGI. I'm upgrading my account to have cgi
dome....are you there?
Avatar of dome74

ASKER

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?

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 -->
Avatar of dome74

ASKER

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
Avatar of dome74

ASKER

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.
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/
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.
How's it going dome74?
Avatar of dome74

ASKER

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.
Avatar of dome74

ASKER

He was very helpful in getting me the answer. I will love to have 'ClassyLinks' help me in the future.
Glad to help dome....I'm usually here.  However, you missed the S....it's she  ;-)  LOL

See you next time!
Avatar of dome74

ASKER

Sorry :}