Why I can't upload file with Smart Class?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   zhi_chou
Posted On:   Thursday, July 19, 2001 01:01 AM

I download the class beans from www.JSPsmart.com web. The JSP file is here, class="com.jspsmart.upload.SmartUpload" /> <% //Initialization mySmartUpload.init(config); mySmartUpload.service(request,response); //Set Restriction mySmartUpload.setAllowedFilesList("gif,bmp,jpeg,jpg"); mySmartUpload.setTotalMaxFileSize(51200); // Upload try{ mySmartUpload.upload(); mySmartUpload.save("c:/www/jsp/sito/upload"); } catch(Exception e){ out.println("Upload Fail") return; } //save file to disk mySmartUpload.getFiles().getFile(0).saveAs(&q   More>>

I download the class beans from www.JSPsmart.com web. The JSP file is here,

class="com.jspsmart.upload.SmartUpload" />

<%

//Initialization
mySmartUpload.init(config);
mySmartUpload.service(request,response);

//Set Restriction
mySmartUpload.setAllowedFilesList("gif,bmp,jpeg,jpg");
mySmartUpload.setTotalMaxFileSize(51200);



// Upload
try{
mySmartUpload.upload();
mySmartUpload.save("c:/www/jsp/sito/upload");

}
catch(Exception e){
out.println("Upload Fail")
return;

}
//save file to disk
mySmartUpload.getFiles().getFile(0).saveAs("/" );

%>

Not error message given, but cann't upload the file to my disk.
And how can I change the uploaded file name when I using this JSP file.
Thank you

   <<Less
About | Sitemap | Contact