cancel
Showing results for 
Search instead for 
Did you mean: 

Using Resource type in Netweaver 7.1 for file upload

Amey-Mogare
Contributor
0 Kudos

Dear All,

I want to check the file extension and file size before uploading it through a file upload UI element in Web Dynpro 7.1.

How to go about it? And I am using following code for image upload. Is it correct one?


IWDResource photoData = wdContext.nodePhotos().getPhotosElementAt(i).getPhotoData();

FtpURLConnection myConnection = new FtpURLConnection(myUrl);		

myConnection.connect();				
OutputStream out = myConnection.getOutputStream();			
		
int temp = 0;
InputStream text = photoData.read(false);

while((temp=text.read())!=-1)
        out.write(temp); 
										
out.flush();
out.close();
myConnection.close();		      

Kindly help.

Regards,

Amey Mogare

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Did you check [this|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71] one?

Bala

Answers (0)