https://github.com/dreamdata-io/sftp-upload
Example script to upload files to dreamdata custom crm sftp server.
https://github.com/dreamdata-io/sftp-upload
Last synced: 5 months ago
JSON representation
Example script to upload files to dreamdata custom crm sftp server.
- Host: GitHub
- URL: https://github.com/dreamdata-io/sftp-upload
- Owner: dreamdata-io
- License: mit
- Created: 2025-02-12T12:33:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-05T13:22:26.000Z (6 months ago)
- Last Synced: 2025-12-08T23:53:26.117Z (6 months ago)
- Language: Python
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# sftp-upload
Example code to upload files to Dreamdata(c) custom crm sftp server.
If you have any specific requirements, you will need to modify the code to suit your needs.
source code available in [GO](main.go) and [Python](main.py)
## Usage
### Installation
You can install this script, as is, to use it as a CLI:
```bash
$ go install github.com/dreamdata-io/sftp-upload@latest
```
or you can clone the repository and run the script directly:
```bash
$ git clone github.com/dreamdata-io/sftp-upload
$ cd sftp-upload
```
### Running
To upload files to the sftp server, you can run the following command:
- with CLI:
```bash
$ sftp-upload -username path/to/file_1.csv path/to/dir
```
- with Go script:
```bash
$ go run main.go -username path/to/file_1.csv path/to/dir
```
- with Python script:
```bash
$ python main.py -username path/to/file_1.csv path/to/dir
```
You can specify multiple files and directories to upload.
You will be prompted for the sftp login password, that is the same one you can get on the Dreamdata(c) platform.
```
> Enter your password for :
```
If any directories are specified, the script will attempt to upload all files in the directory.
You will be prompted to confirm the upload for each directory.
```
> You will upload all files in path/to/dir. Continue? (y/[n])
```
You must type `y` to confirm the upload. If you type anything else, the upload will skip the directory.
You can skip all directory prompts by specifying the `--no-prompt` flag.
```bash
$ sftp-upload -username --no-prompt path/to/file_1.csv path/to/dir
```
The command will upload all supported files specified in paths to the sftp server.
## License
[MIT](LICENSE)