Re: 10.4 and new File now longer works for uploading a file
Re: 10.4 and new File now longer works for uploading a file
- Subject: Re: 10.4 and new File now longer works for uploading a file
- From: David Holt <email@hidden>
- Date: Mon, 25 Jul 2005 15:39:54 -0700
Hi Baiss,
What is your previous server version (the working one, I mean)?
David
--
Always do what is right. It will gratify half of mankind and astound the other.
<x-tad-smaller>
Mark Twain
from Sunbeams: http://www.thesunmagazine.org</x-tad-smaller>
On 25 Jul 2005, at 3:16 PM, Baiss Eric Magnusson wrote:
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
_______________________________________________
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