Hi,
I am giving my webpage the capability of uploading both text & binary files however. My code only works with text files only in which I'm not really sure! That is because, i can upload files of .p, .i , .txt extensions but when I changed the .txt into .ini, It suprisingly didn't worked.
Environment:
OpenEdge 10.1B
Windows Server 2003
Apache 2.2
Heres what I did..
1. Set my Agent's file upload directory: C:\OpenEdge\WRK10.1B\root\webservicerequest\TEMP_UPLOAD
2. Set Binary upload Max Size : -1
3. Restarted the Agent.
Then run the code I found:
Code:
This is probably about extensions. If it is, how can I manage to let webspeed upload files such as .jpeg or .bmp?
Thanks in Advance
I am giving my webpage the capability of uploading both text & binary files however. My code only works with text files only in which I'm not really sure! That is because, i can upload files of .p, .i , .txt extensions but when I changed the .txt into .ini, It suprisingly didn't worked.
Environment:
OpenEdge 10.1B
Windows Server 2003
Apache 2.2
Heres what I did..
1. Set my Agent's file upload directory: C:\OpenEdge\WRK10.1B\root\webservicerequest\TEMP_UPLOAD
2. Set Binary upload Max Size : -1
3. Restarted the Agent.
Then run the code I found:
Code:
Code:
<HTML>
<BODY>
<script language="SpeedScript">
DEFINE VAR mFile AS MEMPTR NO-UNDO.
DEFINE VAR cfile AS CHAR NO-UNDO.
IF get-value('upload') <> '' THEN do:
ASSIGN mFile = get-binary-data("browse").
IF mFile <> ? THEN DO:
{&out} 'Uploaded to: ' + get-config("fileUploadDirectory":U).
ASSIGN cfile = get-value("browse").
COPY-LOB FROM mFile TO FILE cFile NO-CONVERT.
END.
else
{&out} 'Invalid file uploaded: ' + get-value('browse').
END.
</script>
<FORM ENCTYPE="multipart/form-data" ACTION="fileupload.r" METHOD="POST">
<input type=file name="browse">
<INPUT type="submit" value='upload' name="upload">
</FORM>
</BODY>
</HTML>
This is probably about extensions. If it is, how can I manage to let webspeed upload files such as .jpeg or .bmp?
Thanks in Advance