andebor / file-transfer-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple file transfer service for Sesam.io powered applications

Build Status

Usage

Service has only one endpoint POST:/transfer that takes list of json entities as input and return (currently) nothing. Each entity must contain url to attachment and name of file. Default properties file_url and file_id (may be overridden with FILE_URL/FILE_ID env variables)

Downloaded attachment will then be uploaded to URL from env var UPLOAD_URL (required)

Required env vars:

  • UPLOAD_URL # Base url for target system

Optional env vars:

  • FILE_URL default: "file_url" # url to source file
  • FILE_NAME default: "file_id" # source file name
  • TARGET_PATH default: "local_path" # Target file path on receiving system
  • TARGET_PATH_IN_URL default: "false" # If target_path should be sent in url instead of as header
  • CHUNK_SIZE default: 262144 * 4 * 10 # chunk size 10Mb
  • FAIL_FAST_ON_ERROR default: false # If the transfer should fail at first error or try the whole batch

About

License:Apache License 2.0


Languages

Language:Python 94.7%Language:Dockerfile 5.3%