Re: WOUpload different behaviour on deployment
Re: WOUpload different behaviour on deployment
- Subject: Re: WOUpload different behaviour on deployment
- From: Chuck Hill <email@hidden>
- Date: Thu, 13 Jan 2005 10:26:50 -0800
IIRC WOFileUpload had some serious issues back in 5.2.1 Check the
archives or upgrade the server.
On Jan 13, 2005, at 10:12 AM, David Holt wrote:
Hello,
I have a forum that uses WOUpload on the posting page. If the post
contains an attachment, I send the user to a page that allows the user
to enter detailed metadata about the document. If the post doesn't
have an attachment, the user is returned directly to the forum. On my
development server (OSX 10.3.7 WO 5.2.3) it works as expected. On my
deployment server (OSX Server 10.2.8, WO 5.2.1) if there is no file
upload, the filepath is set to 0.9.0.0.2.7.0 in the database and
always sends the user to the metadata page, even if there is no
upload. Does anyone know why this might be happening?
Here is the code:
.wod
--
FileUpload1: WOFileUpload {
filePath = aFileName;
size = "20";
data = aPost.attachment;
}
EO class file
--
// Instance variables for the name, mimetype of the file upload
public String aFileName;
public String aMimeType;
public String tempFileName;
if ( (aFileName != null) && (aFileName.length() > 0) ) {
int length1 = aFileName.length();
String tempFileName = "";
for(int i=0; i< length1; i++) {
if(aFileName.substring(i, i+1).equals("\\")) {
tempFileName="";
} else {
tempFileName = tempFileName + aFileName.substring(i,i+1);
}
}
aPost.setFilepath(tempFileName);
// return tempFileName;
// }
NSLog.out.appendln( "FileName: "+tempFileName );
// aPost.takeValueForKey(tempFileName, "filepath");
nextPageString = "UploadDocument";
} else {
NSLog.out.appendln( "No File Uploaded" );
nextPageString = "ForumTopics";
}
WOComponent nextPage = pageWithName(nextPageString);
return nextPage
}
--
Panic is not an effective, long-term organizing strategy.
Starhawk
from Sunbeams: http://www.thesunmagazine.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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