blackberry / WebWorks-Community-APIs

Community owned repository containing JavaScript Extensions for BlackBerry WebWorks
Apache License 2.0
141 stars 205 forks source link

Bug for UploadDownload sample #19

Open rmasroor opened 13 years ago

rmasroor commented 13 years ago

The source code for the index.html doesn't work straight from the start.

Following items need to change:

From: // Path could be one of http/https u.uploadFile(remotePath, localPath, onProgress, onError, options);

To:

// Path could be one of http/https u.upload(remotePath, localPath, onProgress, onError, options);

From: // Path could be one of http/https d.downloadFile(remotePath, localPath, onProgress, onError, options);

To: // Path could be one of http/https d.download(remotePath, localPath, onProgress, onError, options);

miamon commented 12 years ago

An other bug on Readme:

From:

function doDownload() { var d = blackberry.io.filetransfer;

To:

function doDownload() { var d = blackberry.io.fileTransfer;

devmanny commented 12 years ago

hello, how I can access the files downloaded? I'm using "blackberry.io.dir.appDirs.shared.downloads.path" as localPath, brings me back the modified actual url where only my app can access it, the problem is that you can not access the files downloaded, I am using:

blackberry.io.dir.listFiles (blackberry.io.dir.appDirs.shared.downloads.path)

to verify that the downloaded file is there, and the file I downloaded did not appear in the array.

someone tell me that I can use in localPath?

darkdaven commented 12 years ago

var d = blackberry.io.fileTransfer;

d.download(remotePath, localPath, onProgressChapterImage, onErrorChapterImage, options);

I am using this code, but i got this error:

TypeError: 'undefined' is not a function (evaluating 'blackberry.events.getEventHandler(0)()')