on 05-20-2005 5:03 AM
I'm trying to upload file to a server and I use WDFileUpload UI control. After I select file on the client and click on 'Upload' button nothing happens. Action that assigned to that button is not called. But if FileUpload control is empty, file is not selected, action is called. Any ideas what I'm doing wrong?
Thanks,
Andrei
Hi,
I think it is a problem with the service Pack .it is working fine with SP10.Which Service Pack u are using?
Regards,
Sowjanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was using SP9 and it didn't work. But after I deployed on SP11 it was ok.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Hope you mustve also created value attributes of type binary and string to be bound to the data and filename properties(of the Upload UI element) respectively.
In the 'onActionUpload'method specify the location where you want the file to be uploaded. On browsing, you get the file name in the value attribute assigned to the filename property of FileUpload. This creates a file by this name in the sever. The contents of the file is present in the value attribute bound to data property. This is written to the file created. This happens when you click the Upload button. The code for this is given below.
try
{
String location = "c:
"
String fileName = location + wdContext.currentFileElement().getFileName();
File file = new File(fileName);
FileOutputStream out = new FileOutputStream(file);
if(element.getUpload!=null)
{
out.write(element.getUpload());
out.close();
}
Here 'element' is an object of IFileElement(IPrivateFileUploadView.IFileElement element) 'Upload' is the value attribute bound to the 'data' property of the Upload UI Element.
Kindly revert back for further clarifications
Regards
Leena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.