Multipart form data

Status
Not open for further replies.

fantajim

New Member
Messages
7
Reaction score
0
Points
0
Hello anyone

i used the search but didnt find anything on this subject.

I have a html site that lets users upload files with the corresponding cgi script.

Ive managed to get the text part done but the file wont be uploaded.
Do free hosting users have multipart/form-data access?

Greetz
Fantajim
 
Last edited:

Awesomexr

New Member
Messages
118
Reaction score
4
Points
0
Are you letting visitors upload thier files, i.e like a file storage service?
 

fantajim

New Member
Messages
7
Reaction score
0
Points
0
Hello thanks for the response

I have a website that dedicates itself to Heroes of Newerth, a real time strategy game.

I wanted to give visitors the chance to upload their own playguides in txt and pdf format, is this illegal?
My goal is to just get these files not store them on the servers, just temporary so i can reach them.

if its forbidden im gonna look out for another script that mails me the files.

but back on topic: Can free hosters do forms with multipart/form-data?

Greetz
Fantajim
 
Last edited:

Awesomexr

New Member
Messages
118
Reaction score
4
Points
0
Hello thanks for the response

I have a website that dedicates itself to Heroes of Newerth, a real time strategy game.

I wanted to give visitors the chance to upload their own playguides in txt and pdf format, is this illegal?
My goal is to just get these files not store them on the servers, just temporary so i can reach them.

if its forbidden im gonna look out for another script that mails me the files.

Greetz
Fantajim

I don't think that is illegal, but anyway. - You were trying to get an upload script to work? I think x10 does support multipart/form-access. I'm not sure why it's not uploading. Try this tutorial: http://www.tizag.com/phpT/fileupload.php .
 
Last edited:

fantajim

New Member
Messages
7
Reaction score
0
Points
0
Thx again Awesome

ill try your link and post again.


and here is the site if you want an impression of what im talking about:

http://tastersclub.co.cc/contact.htm

its really simple and im just starting with the site ;D
 
Last edited:

Awesomexr

New Member
Messages
118
Reaction score
4
Points
0
Have you checked the file permissions on the upload folder? Set them/chmod to 777.
 
Last edited:

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Hello thanks for the response

I have a website that dedicates itself to Heroes of Newerth, a real time strategy game.

I wanted to give visitors the chance to upload their own playguides in txt and pdf format, is this illegal?
My goal is to just get these files not store them on the servers, just temporary so i can reach them.

if its forbidden im gonna look out for another script that mails me the files.

but back on topic: Can free hosters do forms with multipart/form-data?

Greetz
Fantajim

You can upload the text and pdf file. As you are not going to use it as file sharing site. You have website and it is fine.
 

fantajim

New Member
Messages
7
Reaction score
0
Points
0
yay thanks ;D

Edit:
yes i have checked the CHMOD and set the script + upload folder to 777

its still not working i just get:

Sorry, we need you to check the following

Can't save file /public_html/upload/Upload_1149.pdf
 
Last edited:

Awesomexr

New Member
Messages
118
Reaction score
4
Points
0
yay thanks ;D

Edit:
yes i have checked the CHMOD and set the script + upload folder to 777

its still not working i just get:

Sorry, we need you to check the following

Can't save file public_html/upload/Upload_1149.pdf

It would be better if you used a php script instead of a cgi script in this case.
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
yes i have checked the CHMOD and set the script + upload folder to 777
Don't set the folder permissions to 777, It should be 755 or less

its still not working i just get:

Sorry, we need you to check the following

Can't save file public_html/upload/Upload_1149.pdf

Which upload script you are using?
 

fantajim

New Member
Messages
7
Reaction score
0
Points
0
Now after setting the script on 777 again and changing some paths i get the following:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@tastersclub.co.cc and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

when i put the script + upload folder on 755 i get the previous error

@Awesome

i must admit i have no clue at PHP, all that they suggested i already did in the HTML form, but instead i let it handle with a Perl sript, its called form2email.net. Its free and "should" be easy. Maybe im just dumb lol

my folders look the following:

/public_html/cgi_bin/heresthescript
/public_html/upload (heres the upload folder)
/public_html/contact.htm (heres the HTML file that triggers the script)

the script wants the following information from me:

my $file_dir = "/public_html/upload";
my $file_URL = "http://tastersclub.co.cc/upload/";

on the scripts page i found the following:

The PATH not URL to the folder to take the files without the final /. Your host may block all or some folders from taking files.
my $file_dir = "/home/path/to/your/file/folder";

The URL not PATH to the folder to take the files without the final /. Your host may block all or some folders from displaying files.
my $file_URL = "http://www.your-website-url.co.uk/files";

so im not sure if i pathed it correctly.

Greetz
Fantajim

sorry for all the trouble, your help is greatly appreciated!
 
Last edited:

Awesomexr

New Member
Messages
118
Reaction score
4
Points
0
For the DIR try this: /home/cpanelname/public_html/upload

URL is fine, i think. I'm not sure if the above will work, just a guess.
 
Last edited:

fantajim

New Member
Messages
7
Reaction score
0
Points
0
I have the feeling that you are right Awesome.

At this point i cant tell since now the script wont even handle forms without attachments.
i have to review it from the start.

brb

EDIT:

ok i found out that the script folder may not have the 777 just the 755 as gsonline said earlier.

EDIT2:

Woohoo its working ;D ;D ;D

Combined teamwork of Awesome and gsonline did the trick!!!

Thanks you very much sirs, you just made my day. Merry Xmas to you ;D

Greetz
Fantajim
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
A small note: the value of an "accept" attribute of a file input should be a comma separated list of MIME types. "contact.htm" currently has "text/*/pdf". It should be "text/*,application/pdf". This doesn't really matter because no major browser currently makes use of the "accept" attribute.
 

fantajim

New Member
Messages
7
Reaction score
0
Points
0
A small note: the value of an "accept" attribute of a file input should be a comma separated list of MIME types. "contact.htm" currently has "text/*/pdf". It should be "text/*,application/pdf". This doesn't really matter because no major browser currently makes use of the "accept" attribute.

Hello mission

Thanks for your feedback and conclusion on the accept attribute!!

im still learning all this and your help is very appreciated, im gonna change this as soon as possible.

Greetz
Fantajim
 
Status
Not open for further replies.
Top