Get started with dropbox.js CDN
MIT licensed
Dropbox.js is a library for building Dropbox sync functionality into web applications.
Tags:- dropbox
- files
- sync
- sdk
- client
- filesystem
- storage
Stable version
Copied!
How to start using dropbox.js CDN
// Include Dropbox SDK
const dropbox = document.createElement('script');
dropbox.src = 'https://cdn.cdnhub.io/dropbox.js/10.34.0/Dropbox-sdk.min.js';
document.head.appendChild(dropbox);
// Wait for the SDK to load
Dropbox.init({ appKey: 'YOUR_APP_KEY' }).then(() => {
// Create a Dropbox metadata file uploader
const uploadFile = (file) => {
const uploadSession = Dropbox.filesUpload({
path: '/MyFolder/UploadedFile.txt',
contents: file,
});
uploadSession.then((response) => {
console.log('File uploaded successfully:', response.file.name);
});
};
// Get a file from the user's computer
Dropbox.filesPicker.choose({ multiSelect: false })
.then((files) => {
if (files.length > 0) {
uploadFile(files[0].file);
}
})
.catch((error) => {
console.error('Error:', error);
});
});
Copied!
Copied!
Copied!
All versions
0.10.0
0.10.1
0.10.2
0.10.3
0.5.0
0.6.0
0.6.1
0.6.2
0.6.3
0.7.0
0.7.1
0.7.2
0.8.0
0.8.1
0.8.2
0.9.0
0.9.1
0.9.1-beta1
0.9.1-beta2
0.9.2
10.0.0
10.1.0
10.10.0
10.11.0
10.12.0
10.13.0
10.14.0
10.15.0
10.16.0
10.17.0
10.18.0
10.19.0
10.20.0
10.21.0
10.22.0
10.23.0
10.24.0
10.26.0
10.26.1
10.27.0
10.28.0
10.29.0
10.3.0
10.30.0
10.31.0
10.32.0
10.33.0
*** 10.34.0
10.4.0
10.4.1
10.4.2
10.4.3
10.5.0
10.6.0
10.7.0
10.8.0
10.9.0
2.0.0
2.1.0
2.2.1
2.3.0
2.4.0
2.5.0
2.5.1
2.5.10
2.5.11
2.5.12
2.5.13
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.5.7
2.5.8
2.5.9
3.0.0
3.0.1
3.0.2
3.0.3
3.0.4
3.0.5
4.0.0
4.0.1
4.0.10
4.0.11
4.0.12
4.0.13
4.0.14
4.0.15
4.0.16
4.0.17
4.0.2
4.0.26
4.0.27
4.0.28
4.0.29
4.0.3
4.0.30
4.0.4
4.0.5
4.0.6
4.0.7
4.0.9
4.1.0-alpha
5.0.0
5.1.0
5.2.0
5.2.1
6.0.1
6.0.2
7.0.0
7.1.0
7.2.0
7.2.1
7.3.0
7.3.1
8.0.0
8.1.0
8.2.0
8.3.0
9.0.0
9.1.0
9.2.0
9.3.0
9.4.0
9.5.0
9.6.0
9.7.0
9.8.0
9.8.2
9.8.4
9.8.5
9.8.6