cancel
Showing results for 
Search instead for 
Did you mean: 

Upload a File Mobile Offline 7.1

Former Member
0 Kudos

Hi,

I need to upload a file on my mobile application (webdynpro mobile offline 7.1). When I ask if the resource == null, the answer is alwasy true. If I make the same exercise with a online scenario it works.

Detail:

I create a node of tipe resource

Bind to a fileUpload Element

Create a button for an action

Action:

if(wdContext.currentContextElement().getRes() != null)

{

IWDResource resource = wdContext.currentContextElement().getRes();

//code needed for some other operations

wdContext.currentContextElement().setSize(this.getFileSize(resource));

String url = wdContext.currentContextElement().getRes().getUrl(1);

wdContext.currentContextElement().setUrl(url);

}

else

wdComponentAPI.getMessageManager().reportWarning("Upload failed");

The app always showme the message that the upload was failed.

Regards;

David Faustini

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

You can check this link.

https://www.sdn.sap.com/irj/scn/wiki?path=/display/mobile/uploadingAttachments-NetweaverMobile7.1

Regards,

Narayani

Answers (1)

Answers (1)

Former Member
0 Kudos