Hi All,
I share a project I'm working on through some executables on dropbox, which users get a link to, so they can download.
I prefer, obviously, that they have an account, so they will have automatic synchronization to these frequently changed files.
However, some do not want to install dropbox and now I'm writing a mini-application (C++ using curl) to download, if necessary, the file(s) before starting the application.
Download is no problem with a the help of some specific curl parameters and the tag dl=1 and I can get some file information (notably the size) through the same proces using the curl parameter NOBODY. I would like to get the datetime, so I can decide automatically whether a full download is necessary. However, the file datetime stamp seems not to be present (the date shown below is date time of request),
(with minor redactions):
HTTP/1.1 200 OK
Server: envoy
Date: Tue, 22 Dec 2020 15:19:52 GMT
Content-Type: application/binary
Content-Length: 3943424
Cache-Control: max-age=60
Pragma: public
X-Dropbox-Request-Id: 81328b5452374573a93f7ddfb328d93b
X-Robots-Tag: noindex, nofollow, noimageindex
Referrer-Policy: no-referrer
Etag: 1609568595538751d
X-Content-Type-Options: nosniff
Accept-Ranges: bytes
Content-Disposition: attachment; filename="myfile.exe"; filename*=UTF-8''myfile.exe
Content-Security-Policy: sandbox
X-Webkit-Csp: sandbox
X-Content-Security-Policy: sandbox
Vary: Origin
X-Server-Response-Time: 394
Strict-Transport-Security: max-age=31536000; includeSubDomains
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Robots-Tag: noindex, nofollow, noimageindex
I then started trying the metadata interface e.g. (from cmd):
curl -X POST https://api.dropboxapi.com/2/files/get_metadata --data "{\"path\": \"id:4uo2ukwz6z9xvb3\",\"include_media_info\": false,\"include_deleted\": false,\"include_has_explicit_shared_members\": false}", but obviously get:
Error in call to API function "files/get_metadata": Must provide HTTP header "Authorization" or URL parameter "authorization".
Before delving deeper into this auth I would like to ask the question: Is there a simple(r) way to obtain file date time using the dropbox link for downloading or another method avoiding additional overhead? Clearly the people downloading are not getting any personal authorization info, so the only recourse is the link, which, as everyone knows, looks like https://www.dropbox.com/s/i1x59cj1zrs8cva/filename.ext?dl=0.
Thanks in advance,
Jan