dropdrive-cmdis simple java command line application for uploading file(s) to Dropbox.dropdrive-coreis core library which provide ability for uploading file(s) to Dropbox.
usage: dropdrive [-a [code]] [-d <dir>] [-f <file>] [-h] [-l] [-p <props>] [-v]
-a [code] - process authorization; waits for code if not provided
-d <dir> - directory for upload; creates new one if no directory exists; default is dropdrive-uploads
-f <file> - upload file(s)
-h - show this help
-l - display authorization link
-p <props> - path to dropDrive properties file
-v - show dropDrive version
- generate authorization URL:
dropdrive -p dropdrive.properties -l - copy and paste URL to your browser to receive authorization code
- authorize application with received authorization code:
dropdrive -p dropdrive.properties -a <code>
- generate authorization URL and wait for authorization code:
dropdrive -p dropdrive.properties -l -a - copy and paste URL to your browser to receive authorization code
- application waits 5 minutes to receive authorization code
- application is authorized automatically with received authorization code
Upload file(s) to Dropbox:
dropdrive -p dropdrive.properties -f <file1> <file2> <file3>
Files are uploaded to dropdrive-uploads directory by default.
If you want to change upload directory:
- change
dropdrive.uploadDirproperty in properties file - or pass directory in
-d <dir>argument:
dropdrive -p dropdrive.properties -f <file> -d <path>/<to>/<dir>
dropdrive.refreshToken- Dropbox refresh token; this property is updated automatically by dropDrivedropdrive.uploadDir- path to dir where files will be uploaded:<path>/<to>/<dir>
dropDrive core can be used in any other application to provide ability for uploading file(s) to Dropbox.
- add implementation of
IDropDriveCredentialinterface to spring context or useSimpleDropDriveCredentialor extendAbstractDropDriveCredential - provide client key as
dropdrive.core.drive.clientKeyproperty in spring context - provide client secret as
dropdrive.core.drive.clientSecretproperty in spring context - import dropDrive spring context with annotation
@Import(net.czpilar.dropdrive.core.context.DropDriveCoreContext.class) - autowire
IFileServiceand use file uploading methods
Copyright 2015-2026 David Pilar
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.