10.4 and new File now longer works for uploading a file
10.4 and new File now longer works for uploading a file
- Subject: 10.4 and new File now longer works for uploading a file
- From: Baiss Eric Magnusson <email@hidden>
- Date: Mon, 25 Jul 2005 15:16:28 -0700
I have found out that the file uploading logic is no longer working
with the new server and I am having trouble trouble-shooting the
problem.
The following folder exist with permissions on the server
<drwxrwx--x 27 baiss admin 918 Jul 22 13:53 Flyers>
I have the following code which used to work...
public WOComponent uploadFile() {
if ( actualFilePath == null || actualFilePath.length() <= 0) {
throw new NSForwardException( new Exception
("actualFilePath was null, or there were zero bytes in the file, when
the uploadFile button was clicked. "), "uploadFile" );
}
try {
File uploadedFile = new File( actualFilePath );
bytesWritten = uploadedFile.length();
if ( bytesWritten <= 0 ) {
throw new NSForwardException( new Exception
("bytesWritten is zero or less. To-> " + actualFilePath), " ***
uploadFile ***" );
}
} catch ( Exception e ) {
throw new NSForwardException( e, "An exception was
thrown when trying to <uploadFile>. " + e.toString() );
}
return null;
}
But now I get my own exception...
Error:java.lang.Exception: bytesWritten is zero or less. To-> /
Library/WebServer/Documents/nwsufis/Flyers/Tarball.txt
If you have read this far you can see that the input file
<actualFilePath> as selected by the user is present and has bytes in
it and the file path on the server looks good and <new File> doesn't
throw any exception of its own.
Is there some other high order permissions that needs to be set on a
new server?
----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden