Solved

Front Page file Upload and view

Posted on 2001-07-26
29
157 Views
Last Modified: 2013-12-24
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?
0
Comment
Question by:dome74
  • 16
  • 12
29 Comments
 
LVL 7

Accepted Solution

by:
ClassyLinks earned 125 total points
ID: 6326456
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6335858
Dome...are you there?
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6345641
Dome, please return and let me know if there is anything else you need to complete this question.
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6359182
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
 
LVL 3

Expert Comment

by:modder
ID: 6372327
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6398626
modder...please delete.

Thanks.
0
 

Author Comment

by:dome74
ID: 6399131
I'm sorry my computer was down. I just got it back again. I'm sorry for the delay.
0
 

Author Comment

by:dome74
ID: 6399136
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6399165
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
 

Author Comment

by:dome74
ID: 6408421
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6409558
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
 

Author Comment

by:dome74
ID: 6411760
Ok know how do I get it to pull up on a page after it is uploaded?
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6413055
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
 

Author Comment

by:dome74
ID: 6420188
How do I do this with CGI. I'm upgrading my account to have cgi
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6420215
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6453208
dome....are you there?
0
 

Author Comment

by:dome74
ID: 6454966
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6455139
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
 

Author Comment

by:dome74
ID: 6455227
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
 

Author Comment

by:dome74
ID: 6455248
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6456851
The server is saying it cannot find this page:

http://www.midwestmountainbiker.com/public_html/cgi_bin/pictures.cgi
0
 

Author Comment

by:dome74
ID: 6458987
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6460460
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6464828
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
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6483378
How's it going dome74?
0
 

Author Comment

by:dome74
ID: 6500839
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
 

Author Comment

by:dome74
ID: 6500843
He was very helpful in getting me the answer. I will love to have 'ClassyLinks' help me in the future.
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6501064
Glad to help dome....I'm usually here.  However, you missed the S....it's she  ;-)  LOL

See you next time!
0
 

Author Comment

by:dome74
ID: 6501564
Sorry :}
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now