I am sure this is an easy task for someone
who knows what they are doing (i.e. not me)
In the "Upload File" sample, only text is handled
and the code looks like:
function handleUpload(form) {
var buf = new java.lang.StringBuffer();
var uploadWidget = form.lookupWidget("upload");
if (uploadWidget.getValue() != null) {
var stream = uploadWidget.getValue().getInputStream();
var reader = new java.io.BufferedReader(new
java.io.InputStreamReader(stream));
var line;
while ((line=reader.readLine())!=null)
buf.append(line).append("\n");
reader.close();
}
return buf.toString();
}
It seems it should be possible to upgrade this to
write out binary...??? Specifically, I want users to
be able to upload standard image files - JPEG, GIF
and PNG (and maybe BMP). The ideal solution would
only allow these files types, but this is less critical than
simply being able to get binary uploaded in the first
place.
Any help appreciated... if the solution works, maybe
I can post it to the Wiki for future reference.
Thanks
Derek
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]