dimanche 22 février 2015

Programatically uploading a file



I'm developing a small program that uploads and downloads files from my box account.


I looked at the docs about uploading files and I found this code:



BoxFolder rootFolder = BoxFolder.getRootFolder(api);
FileInputStream stream = new FileInputStream("My File.txt");
rootFolder.uploadFile(stream, "My File.txt");
stream.close();


I don't really understand how it works. Where can I put the path to the file I want to upload? Or should I use different code?




Aucun commentaire:

Enregistrer un commentaire