failed upload text file to server

yoachan

Member
Dear All
I'm using OpenEdge 10.A on LINUX RED HAT AS 4 with Apache 1.3 as my Web Server.
The problem is I can't upload any TEXT file to my sever.
Yes, I have use the 'FileUploadDirectory', and a form with 'post' method and 'multipart/form-data' enctype like below.

<form name="frmUpload" method="post" ENCTYPE="multipart/form-data"
action="http://10.76.50.1/cgi-bin/fgw_cgi.sh/test_p.r" onSubmit="return doUpload(this)">
<table width="100%" border="0" cellspacing="2" cellpadding="5">
<tr><td align="center">
<input name="txtAlamat" type="file" size="60">
</td></tr>
<tr><td align="center">
<input name="btnPosting" type="submit" value="Posting data" style="width:200px">
</td></tr>
</table>
</form>

Before using OpenEdge 10.A, I'm using Progress 9.1E, and everything just went OK. But the day I upgrade my PROGRESS to OpenEdge 10.A, the same and exact upload code is not working. I can't find my uploaded file in my FileUploadDirectory. But others seems to be Ok.
Any suggestion?
Best regards.
 

Casper

ProgressTalk.com Moderator
Staff member
This code works for me in 10.1A:
Code:
HTML>
<BODY>
<FORM ENCTYPE="multipart/form-data" ACTION="someaction" METHOD="POST"> */
 <INPUT type="file" name="filename">
 <INPUT type="submit">
</FORM>

maybe something in your doUpload JS?

Casper
 

yoachan

Member
I have erased my JS. But it's still not uploading.......
Everyting but HTML, HEAD, BODY, FORM, FILE, and SUMBIT tag has been erased.
have any other idea?
I'm despertly despert here.............
 

Casper

ProgressTalk.com Moderator
Staff member
Did you use my code snippet? (With a different action?).
Are you sure your fileUploadDirectory has full path-name in it and is not in the ProPath?
Are you sure the FileUploadDir has RW permissions?
Are you sure the file is plain text? (Otherwise you have to set the binary upload max size....

Casper.
 

Casper

ProgressTalk.com Moderator
Staff member
BTW, your code snippet works for me also....
Maybe some of the other points I asked?

casper.
 

yoachan

Member
Are you sure your fileUploadDirectory has full path-name in it and is not in the ProPath?
Yup! I wrote '/work/upload' for my fileUploadDirectory. I've put it under '[UBroker.WS] in ubroker.properties file. I've tried to put it under [UBroker.WS.wsbroker1] but I got the same result: NOTHING.

Are you sure the FileUploadDir has RW permissions?
Yup!

Are you sure the file is plain text
Yup!

But thank's to you, I found another clue. IF the file extension is ".TXT", everything went OK. BUT if I change the file extension to be something else (in my case .DAT) it's not uploading.
Strange, isn't it? Progress 9.1x seems to be OK with file extensions, as long as it IS a text file. But why OpenEdge 10.1A is so..... so....... 'stupid'?
Have any other idea so I can continue uploading text file with .DAT extension?
A big thanks to you.
 

Casper

ProgressTalk.com Moderator
Staff member
Sorry to disappoint you, but I have no problems with uploading files with .dat extension. Tested it with your code sample and uploaded same file with different extensions (including .dat).

If you do it binary does it work then?

Strange indeed. I use OE10.1A02 and IE 6 browser. Can it be that there is some antivirus or something which blocks .dat files? (Just an idea). Do you see something in the webserver log file?

Casper.
 

yoachan

Member
I'm a bit disappointed, actually;p . But it's ok. I'll find another way, and when I found one (or more) I'll share it with u.
Thanks fot u'r big help. at least I've got several clues from you.
Thanks again.:biggrin:
 

yoachan

Member
Yo! Casper!!! I'm Succeded!!!!

As my promise to you, I'll let u know if I've got the answer. And today my lucky star shining upon me. and voilla! Someone comes to me with the answer that I've been looking for ages.:biggrin:
It's just a simple task to do, yet I have no idea that it'll be the cause of all disaster that I've been sunk in. It's called 'MIME TYPE'. I'm still not sure about who's mime-type (Server's or Browser's) for to change server's mime type I believe I must reboot my server (that will caused me being killed by fellow friends).;p

I think u know that there is a mime for a plain text. It usually have an .txt extension. So, to upload any other extension as a PLAIN TEXT we must treat them as a plain text to in the mime type. (In my case I added 'dat' extension in plain text's mime tipe, so that 'dat' will be considered as a plain text).

Why PROGRESS 9.1D have no problem with this? Because it didn't support binary upload file. So perhaps it assumed all uploaded file as a plain text. But OE 10.1A supported binary file, so it needs a specific mime type for plain text.

But I still have no idea how come everything went OK on your side. Did u add 'dat' as a plain text too on your mime type?:confused:


What do you think?:biggrin:
 

Casper

ProgressTalk.com Moderator
Staff member
It's browser dependant. In IE, you are also allowed to use ENCTYPE, as in my and your example. Do you use IE?

Casper
 
Top