Uploading binary files to Dropbox


/ Published in: Java
Save to your folder(s)

Uploading a binary file(like .doc) to Dropbox.
I tried with .ics and it worked.


Copy this code and paste it in your HTML
  1. byte [] buf = new byte[1024];
  2. for(int readNum; (readNum = fis.read(buf)) != -1;) {
  3. bos.write(buf, 0, readNum);
  4. System.out.println("read "+ readNum + "bytes,");
  5. }
  6.  
  7. ByteArrayInputStream inputStream2 = new ByteArrayInputStream(bos.toByteArray());
  8. Entry newEntry = mDBApi.putFile("/uploads/"+file.getName(), inputStream2,
  9. bos.size(), null, null);

URL: http://stackoverflow.com/questions/10153640/uploading-binary-files-using-dropbox-java-api

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.