Hi all,
I have a question about how to use the Dropbox API to accomplish something: sync a bunch of files into a Dropbox folder.
Sounds easy, right? Well, this is going to be done from an embedded (microcontroller) target, so I have to do 100% of it myself.
I am almost not a backend dev, so I might be overlooking something, or thinking about this in the wrong way.
The proposed method for a minimal "sync" implementation is:
1) Iterate over local files using a set filename wildcard
2) For each file, call files/get_metadata
3) If file does not exist, call files/upload, go to next file
3) If file exists, check the hash & dates against the hash & dates of the existing local file
4) If hash is different, call files/upload to overwrite the remote file
Does that sound right? Am I misusing the API?
The application is that I have a data-gathering device which records to an SD card, but the SD card is significantly hard to access, due to legacy design.
(yes, I could possibly roll my own lambda function that pushes to S3 or something similar, but having files "magically" appear onto a Window PC as a result of this sync operation would be a great feature, in this application.)
And the stretch goal:
On my system, TLS is extremely expensive - 10+ seconds of compute time for handshaking.
Is there a batch-equivalent for getting metadata? I did not see one in the docs.
And/or does Dropbox API allow for a number of sequential HTTP transactions all across a single keep-alive socket?