PDA

View Full Version : anyway to add form fields to this?


gba88
02-09-2009, 02:03 PM
Hi,
I'm checking out this file upload script(from http://www.perlservices.net/en/programs/psupload/ ), and would like to know if there is anyway to add a few form fields so that the person uploading the file can give their name and/or description of what they're uploading.

here is the code from the upload page (it currently just lists a file field/browse and upload button):



********************** html form code**********************************************


<form action="/cgi-bin/upload.pl" method="POST" ENCTYPE="multipart/form-data">
<table align="left" border=0 cellspacing=0 cellpadding=5>
<tr>
<td align="left"><font face="verdana" style="font-size:10pt">File Attachment</font></td>
<td><input type="FILE" name="FILE1"></td>
</tr>
<tr>
<td></td>
<td><input type="SUBMIT" value="Submit File" style="cursor:hand;"></td>
</tr>
</table>
</form>


************************ end html form code********************************



I can't post the script since it is too lengthy, but maybe someone can check it out from the link I posted and let me know? please post if you can help, Thanks!

KevinADC
02-09-2009, 06:11 PM
I can tell you it is possible, but I am not going to go through the process of getting the script and checking out how to do it with your script.

bazz
02-09-2009, 06:31 PM
Sorry, I don't have time just now to look further for you but; I would suggest you find a better script.

Such vague and general comments on their site just put me off.

CGI File upload scripts do not perform as well as PS Upload because they are out of date or have been poorly coded.


This makes them appear to me as amateur. If non of my uploads are over 20Mb, this (next quote) is totally irrelevant. security doesn't even get a mention although they do give a 10% voucher to you if the FREE script doesn't perform as described


On June 6th, 2003 we were notified by P. Miunske that he used PSUpload to transfer a gigantic 1.2Gb (Yes, Giga Byte) file on a 100MBit network.

Please note that this is not a maximum limit for the program, but simply the largest file we have been made aware of!



A CGI file upload script work just as well as they have been written. They need to fundtion as required and they need to be secured.

bazz

gba88
02-09-2009, 10:51 PM
Thanks for the replies. Yeah, I figured it was possible, but I honestly have no programming knowledge. I'm good with html and css, and getting things to "look" how I want them to; but that's where it ends.

I think what I'd need to do is alter the script and put a section in where it would write the desired fields to the notification email.

The server I have access to is a windows 2k3 server (no php and i can't get the administrators to install) and it's pretty limiting, I've seen java applet uploaders, but they require end users to have java turned on and accept certificates and it's just too much bs from that perspective. I just need a simple script that will allow uploads up to a few hundred MBs (ppl would mostly be uploading zipped design files), and one that allows the user to fill out a few fields and then have the script use sendmail to send an email notification.

I've searched for quite some time, but it seems that what I'm looking for doesn't exist "ready made". I've seen a few with form fields, but they limit file sizes to under 100MB, and that won't work. If anyone can steer me in the right direction, I'd certainly appreciate it. Thanks,

bazz
02-09-2009, 10:58 PM
You might find this link useful, either to work your way through building your own script or at least, to give you an idea of what you need to achieve so, as you progress, we can help you.

http://www.sitepoint.com/article/uploading-files-cgi-perl/

bazz

gba88
02-09-2009, 11:11 PM
You might find this link useful, either to work your way through building your own script or at least, to give you an idea of what you need to achieve so, as you progress, we can help you.

http://www.sitepoint.com/article/uploading-files-cgi-perl/

bazz

Thanks! Yeah, I think I may have come across that exact article at one point. I'll look into it thoroughly now though.

I've worked with the form tag before, obviously, but simply adding this to the html won't work..I'd need to add the command in the script to "print" the field to notification email, and that's where I get lost. Unfortunately I don't have administrative access to the server that I'm trying to do this on either. Everything was previously done with asp, but I FINALLY got them to install perl after about a month and a half.

Thanks again

bazz
02-09-2009, 11:21 PM
Are you restricted to the one host?

There are others out there which cost very little and which would have perl, php, phpMyAdmin etc installed on a unix server. Others , which I am less famliar with may have a m$ server.

You do have ftp access, yes? thats about all you should need for this type of script - once you have perl installed.


bazz

gba88
02-10-2009, 12:21 AM
Are you restricted to the one host?

There are others out there which cost very little and which would have perl, php, phpMyAdmin etc installed on a unix server. Others , which I am less famliar with may have a m$ server.

You do have ftp access, yes? thats about all you should need for this type of script - once you have perl installed.


bazz

Well, let me explain the situation... I'm trying to set this up for work. They run their own server, so yeah, the restrictions are very tight. I'm basically a graphic designer who had pc building experience and html coding experience. So, when they needed the website re-done, I was the person who took care of it. Now since they have a functioning website, they're trying to do a lot more with it. Things like allowing users to upload files instead of setting up ftp accounts for every single time someone needs to submit a file or 2.

That's the story, so I'm really limited to what I can do since I don't work at the main office where the server/s is housed, and the main people who do the server work are not easy to get a hold of and are not very responsive.

edit: yes, i have ftp access, and have been using the ps upload script, but since the notification goes out to several departments, we're looking for a way to allow users to add a message or details to their upload notification so that we know who it is intended for.

KevinADC
02-10-2009, 03:36 AM
You should tell them you have no qualification for this work and it should not be done by a person that does not understand the implications of modifying a script that runs on the server. They need to hire a competent programmer. try elance.com or other site that hooks up programmers with customers. Can probably get it done very inexpensively.

gba88
02-10-2009, 09:11 PM
You should tell them you have no qualification for this work and it should not be done by a person that does not understand the implications of modifying a script that runs on the server. They need to hire a competent programmer. try elance.com or other site that hooks up programmers with customers. Can probably get it done very inexpensively.

oh yeah, TELL me about it. my strength is in computer hardware, and everyone knows this. It's just that they are very cheap and will just push their employees to try to get them to do WHATEVER they can in order to save money or not have to hire other people. Probably like most businesses though.

KevinADC
02-10-2009, 10:21 PM
Well, good luck then.

gba88
02-11-2009, 01:46 AM
Well, good luck then.

Thanks! I'm probably just going to end up telling them that they need to get someone to write a custom script. In the meantime I'll prob put something on the site instructing ppl who upload to name their files in a descriptive way so that the right dept. retrieves it.

I'll still probably look into this myself, but with working full time and having responsibilities outside of work, it's tough to fit in much free time where I could mess around enough to teach myself.

When I get time, I'll be checking out that link posted by bazz a couple posts back. Thanks for all the replies, no one needs to waste anymore time responding to this thread.

KevinADC
02-11-2009, 06:40 AM
The article on sitepoint is OK, but I think mine is a bit better really:

http://bytes.com/topic/perl/insights/672398-how-upload-files-using-cgi-pm-module-perl

The resemblance to the sitepoint article and mine is not coincidence. The article on sitepoint is written around many suggestions I made to Matt Doyle to improve the quality of the old article that was posted. He used all of my suggestions but gave me no credit in the article. So I wrote my own article.

gba88
02-11-2009, 11:21 AM
The article on sitepoint is OK, but I think mine is a bit better really:

http://bytes.com/topic/perl/insights/672398-how-upload-files-using-cgi-pm-module-perl

The resemblance to the sitepoint article and mine is not coincidence. The article on sitepoint is written around many suggestions I made to Matt Doyle to improve the quality of the old article that was posted. He used all of my suggestions but gave me no credit in the article. So I wrote my own article.

Thanks Kevin! I'll definitely check out your article instead of the first link. I know all too well about not getting credit for things you've put a lot of time and energy into. The article looks well written and easy to follow. Thanks again.