Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Contributor
lobsterEater
Posts: 20
Registered: ‎04-30-2012
My Carrier: Potato
Accepted Solution

Javascript copy files in Playbook directory

[ Edited ]

I'm trying to copy images from my application directory to the playbook picture folder.

I haven't been doing javascript in a long time, and unsure what I'm doing wrong. Can someone please point me to the right direction? Thanks

 

<script language="javascript">
function downloadImage() {
var picturePath = "accounts/1000/shared/photos";
var imagePath= "../images/";

copy(imagePath+ "picture.jpg", picturePath);
}
</script>

I can't wait for dinner! :smileytongue:
Please use plain text.
Contributor
lobsterEater
Posts: 20
Registered: ‎04-30-2012
My Carrier: Potato

Re: Javascript copy files in Playbook directory

[ Edited ]

okay... ignore my last post I was being stupid :smileytongue:
ReRead the API Reference:
Shouldve wrote
blackberry.io.file.copy(filePath, "file:///SDCard/myxmlfile2.xml");
Instead of
copy(filePath, "file:///SDCard/myxmlfile2.xml");

I can't wait for dinner! :smileytongue:
Please use plain text.