Is there any unique identifier associated with a Dropbox file that doesn't change with revisions/changes/renaming, that can be accessed via the RESTful API? I want to store it in the database and keep track of some operations on the file.
Unfortunately, no, the Dropbox API does not currently expose any sort of file ID or hash like this.
Edit: The Dropbox API v2 does now offer file IDs that persist across moves/renames. You can find more information under "Path formats" in the documentation.
The file ID is available as the id field on the FileMetadata object, e.g., as returned by /files/get_metadata.
The new Dropbox API v2 supports IDs for files and folders.
However, it doesn't automatically differentiate file/folder moves, renames, etc. from deletions and creations in the event stream. You can use a service like Kloudless which provides a unified cloud storage API that includes file/folder IDs for Dropbox. Kloudless also normalizes the event stream and provides access to several other cloud storage services through a single API. (I work at Kloudless)
Related
I am looking at creating an app that uses cloud storage for image storing, and according to this it seems like it is smart to create a bucket per user. However, this seems like a bad idea when you think about scaleability and such because you'd have millions of buckets. My question is: for an app that uses storage buckets to store images, is it better to create a per-user bucket or use a single bucket and just name files uniquely according to user-email and limit accesses to the files inside to each user?
It seems like every doc I visit mentions creating the bucket either in the console or in gsutil but I am looking to see if there is a way to do it from the react-native client side. This way when a user creates a new account, a new bucket can be allocated to them. I have looked into the Google Cloud JSON API too.
The main goal of my project is to read Autocad(DWG) drawings from my local server to output them in a web browser (Chrome).
I managed to do it with the View and Data API in JAVA from Autocad with buckets, Key, etc. but when it comes to read offline files with this sample code from https://github.com/Developer-Autodesk/view-and-data-offline-sample, the DWG format did not work.
Do you have suggestion or have a clue to use the offline API with DWG files?
The Autodesk View & Data API (developer.autodesk.com) allows you to display a DWG on your website using a zero-client (WebGL) viewer. You need to upload the DWG to the Autodesk server, translate it, and either then download the translation to store on your local server (as demonstrated on extract.autodesk.io) or keep it on the Autodesk server. You might consider downloading it to be advantageous because then you don't need to implement the OAuth code on your server.
Buckets on the Autodesk server can only be accessed using the accesstoken created from your API keys, so it is secure in that only someone with your accesstoken and who knows the URN can access your translated file. However, for the viewer on your client-page to access the file, you need to provide it with your accesstoken. This does mean that someone could separately access your translated file by grabbing the accesstoken and URN from your webpage. But if you're serving up the model on a public page, then you presumably don't care about that.
There is a 'list' API available, but this is white-listed (available on request), so getting your accesstoken and urn for one file doesn't automatically give access to your other files - unless someone can guess the other filenames (or iterate to find them).
If you use a non-permanent bucket, then your original (untranslated file) becomes unavailable when the bucket expires, or you can explicitly delete the untranslated file (using the delete API).
Files translated via the View & Data API are not accessible via A360. They are stored in a separate area. (But I wouldn't be at all surprised if an A360 file access API became available in the near future :-).
Finally, unless you want to interact with the displayed file via the viewer's JavaScript API, you may prefer just to upload your files to A360, share the translated model, and then iframe embed them in your webpage.
I run a multi-gigabyte audio content subscription service. Right now all of our clients get download links via email for all of the content.
I had an idea of employing the Dropbox API after a "successful charge" webhook and giving (read-only) access to a shared Dropbox folder with all of the content. That way, the customer would stay in sync with all updates, changes etc...
The way I picture it, the user checks out and is immediately asked if he would like to add our company's folder to his/her Dropbox.
Does this seem feasible/practical?
Looking at the API, I only see an option to provide a download link but not an actual shared folder. Am I correct in this observation?
That's correct, the Dropbox API doesn't currently offer any API calls for managing shared folders. It only has a way to get the read-only share links like you mentioned.
However, if you'd be interested in potentially participating in a shared folder API beta in the future, please sign up here.
#Greg's answer is correct, but I thought I'd mention a couple other options:
You could use the Saver to let users save the files directly into their Dropbox. This wouldn't help you to push new content to them—they'd still have to visit your site to save the new files—but it would let you cut down on your bandwidth costs, since Dropbox would cache the files for you.
You could use a combination of /copy_ref and /fileops/copy to copy the contents from a central Dropbox account into each user's Dropbox. This wouldn't use any of your bandwidth (once the file was in the central Dropbox account).
Please note, however, that free Dropbox accounts only start with 2GB of storage space. Since you mentioned "multi-gigabyte," you'll need to keep in mind whether your customers will actually have sufficient Dropbox space to store the files you want to share with them. (Even if you were able to use a shared folder, they would need to have enough space left to accept the shared folder invitation.)
I'd like to be able to set the client_mtime in the dropbox file metadata. In the dropbox api docs it states
client_mtime For files, this is the modification time set by the
desktop client when the file was added to Dropbox, in the standard
date format. Since this time is not verified (the Dropbox server
stores whatever the desktop client sends up), this should only be used
for display purposes (such as sorting) and not, for example, to
determine if a file has changed or no
I'd like to be able to set this via the API. It clearly is possible to set because the desktop client does it but I can't find a documented way.
Is there a way to set this?
Replying to my own question a couple of years later...
The Dropbox v2 API does allow you to set client_modified when you upload a file now.
You don't appear to be able to change it without uploading the file again though.
[This answer is out of date. The Dropbox API v2 supports setting the modified time.]
This can't be explicitly set via the API, though it does get updated to the current time when you upload a file via the API.
I have read the docs for SkyDrive REST APIs but didn't find any API using which i can sync with the SkyDrive, without recursive polling the folders for update check.
Is there any API to get only the update for a user Drive?
A commonplace reality of epistemology is that...
It is typically much easier to prove that something exists than to prove that it does not exist
Never the less I can say with a high level of confidence that the official REST API for Skydrive doesn't include a way of getting a list of updated documents for synchronization purposes.
Furthermore I didn't see any evidence of a non-supported/non-official API that would serve this purpose and by observing the way the Windows Client for SkyDrive interacts with the server (within limit of fair-use reverse engineering), it appears that the synchronization is done by reviewing the directory tree rather than getting a differential list.
I believe the closes you can go is: Get a list of the user's most recently used documents
To get a list of SkyDrive documents that the user has most recently
used, use the wl.skydrive scope to make a GET request to
/USER_ID/skydrive/recent_docs, where USER_ID is either me or the user
ID of the consenting user. Here's an example.
GET http://apis.live.net/v5.0/me/skydrive/recent_docs?access_token=ACCESS_TOKEN