This package contains two data types.
1. PMG Dropbox Selector: used to browse a users dropbox and user can select a file. The file info is saved in umbraco.
2. PMG Dropbox Save: allows a user to save a media item to dropbox. For now this ONLY works on images inside of the media section because I haven't figured out how to generate the public url for a node using the umbraco angular services.
You will need to sign up for a dropbox dropins api key here: https://www.dropbox.com/developers/apps/create
Enter your api key on the data type.
PMG Dropbox Selector
Add the data type to your document type and you can now select a file from dropbox.
The information is stored in the following format (JSON):
// Name of the file.
// URL to access the file, which varies depending on the linkType specified when the
// Chooser was triggered.
// Size of the file in bytes.
// URL to a 64x64px icon for the file based on the file's extension.
// A thumbnail URL generated when the user selects images and videos.
// If the user didn't select an image or video, no thumbnail will be included.
Assuming you have a document property named "dropbox", you can extract the json info like this:
var dropBoxFile = Json.Decode<Dictionary<string, string>>(Umbraco.Field("dropbox").ToString());
PMG Dropbox Save
Just add it to a media type and the user can click to save their media image file to dropbox. This won't work from localhost.
You need to sign up for an api key
You must touch the web.config/flush cache after installing.