I am not sure whether to read the file as as Array Buffer or as a dataURI or as a binary stream. Which would be better?
Also, won't these methods be memory intensive and make the app/device slow, especially when uploading big files like 150mb or so?
And yet another thing is whether the file will be "openable" as it was originally? Example: If I read a .zip file using one of the methods and then download the file later, will it still open as ZIP?
I am partly confused because of this analogy: We can easily view a JPG or PNG file and we can also display them in a browser using their dataURI (base-64)... but when we save that base-64 string as a JPG or PNG file, the image cannot be seen. Therefore, I cannot understand how should I read the contents of the file to be able to upload it on dropbox (keeping in mind that a file can be around 150MB too) and still retain how the file originally was.
Let's say I want to upload an .mp3 or a .zip file. Then how should I upload this to a user's dropbox account using the Javascript Dropbox SDK?
Kindly clear this confusion and help me out!
Thanks!