Repository navigation
Conversation
Now using Dropbox hash as etag. The current solution is clumsy and unefficient.
|
For hasUpdated you can pass the existing hash to the metadata call (see https://www.dropbox.com/developers/core/docs#metadata) and speedup the cases where the folder hasn't changed Also, does the hash value of a folder changed when a file nested multiple levels deep has changed? |
|
Yes. The only issue is I need to pass "true" to list to get the new hash. Whether hash value changes for nested changes is a good question, something I intended to try out. |
You need to look at the mimetype |
|
Just checked, if you have a dir "dir1/dir2/" and you create a subdir "dir3" in "dir2", the hash of 'dir1" will change. I've changed to code to pass the existing hash to Dropbox, but for some unknown reason it returns 401 Unauthorized (same arguments without the hash work). Not sure what's going on, so I've put in a dirty workaround. There is still some work to be put into this before it can work efficiently. Detecting updates now works though, but is wasteful / slow. |
|
Test passed. |
|
ping |
|
Just tested this, and it works for me. |
|
@enoch85 wow, thanks for testing. |
|
Yeah, no problem. Just a simple test though.
|
|
What about this @PVince81 ? |
|
💣 Test FAILed. 💣 |
|
💣 Test FAILed. 💣 |
|
💣 Test FAILed. 💣 |
|
Closing. We shall look into use Flysystem's Dropbox implementation instead. |
⛔ NO MERGE
Now using Dropbox hash as etag.
The current solution is clumsy and unefficient.
I think I'll have a try using the "rev" attribute next, as the current solution requires loading the whole directory listing, else Dropbox doesn't deliver the hash attr.
For some reason, when I read the hash from the storage cache it already has the latest value, so hasUpdated() is always false for dirs. Still, refreshing seems to work...
FYI @icewind1991