https://github.com/ThomasMaul/FileTransfer_Class
Class for filetransfer with ftp/sftp/ftps via curl, dropbox and gdrive support
https://github.com/ThomasMaul/FileTransfer_Class
4d-code 4d-component
Last synced: 5 months ago
JSON representation
Class for filetransfer with ftp/sftp/ftps via curl, dropbox and gdrive support
- Host: GitHub
- URL: https://github.com/ThomasMaul/FileTransfer_Class
- Owner: ThomasMaul
- License: mit
- Created: 2022-02-02T12:54:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T07:21:13.000Z (7 months ago)
- Last Synced: 2024-09-10T11:39:48.347Z (7 months ago)
- Topics: 4d-code, 4d-component
- Language: 4D
- Homepage:
- Size: 96.1 MB
- Stars: 6
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.MD
- License: License
Awesome Lists containing this project
- awesome-4d - File Transfer
README
# File Transfer Class collection
FTP - FTPS - SFTP(*) - HTTPS(*)
Using cURL - wrapper for Mac/Win build in cURL featureDropbox
Using Dropbox CLI tool (easy to deploy)Google Drive - GDrive
Using Gdrive CLI toolRclone (NEW)
Over 40 cloud storage products support rclone including S3 object stores, business & consumer file storage services, as well as standard transfer protocols.## Introduction
This class collection provide a similar interface for file transfer via different channels.
Same commands/code can be used to upload/download files, create/rename/move/delete directories or files (depending of feature set) for FTP or HTTP or Dropbox or GDrive.For FTP/FTPS/HTTPS the system build in cURL version can be used, but also overwritten with another version.
For Dropbox a CLI tool (written in Go) is used.
For GDrive a CLI tool (written in Go) is used
rclone is a CLI tool (written in Go)
# Usage example
```4D
// download from ftps
var $ftp : cs.FileTransfer_curl
$ftp:=cs.FileTransfer_curl.new("ftp.4d.com"; "username"; "password"; "ftps")$source:="/product/4D.dmg"
$target:=Convert path system to POSIX(System folder(Desktop))
$result:=$ftp.download($source; $target)// download from https
var $ftp : cs.FileTransfer_curl
$ftp:=cs.FileTransfer_curl.new("www.4d.com"; ""; ""; "https")$source:="/de"
$target:=System folder(Desktop)+"newtest2.html"
$target:=Convert path system to POSIX($target)
$result:=$ftp.download($source; $target)// download from Dropbox
var $ftp : cs.FileTransfer_Dropbox
$ftp:=cs.FileTransfer_Dropbox.new()$source:="/product/4D.dmg"
$target:=Convert path system to POSIX(System folder(Desktop))
$result:=$ftp.download($source; $target)// download from GDrive
var $ftp : cs.FileTransfer_GDrive
$ftp:=cs.FileTransfer_GDrive.new()$source:="/product/4D.dmg"
$target:=Convert path system to POSIX(System folder(Desktop))
$result:=$ftp.download($source; $target)```
# Documentation## cURL (FTP - FTPS - SFTP - HTTP - HTTPS)
[Documentation](Documentation/Readme_curl.MD)## Dropbox
[Documentation](Documentation/Readme_dropbox.MD)## GDrive
[Documentation](Documentation/Readme_GDrive.MD)## Rclone
[Documentation](Documentation/Readme_rclone.MD)