Skip to Content
0
Former Member
Mar 06, 2009 at 03:38 PM

Upload a File Mobile Offline 7.1

35 Views

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