1

I am searching a tool for uploading files via HTTP.

For FTP there are several tools.

Required features:

  • open source
  • scriptable / CLI
  • if the upload was successful, the files should get moved to a different directory
  • should run on Linux/Windows/Mac.
6
  • Really, open-source? Or just gratis? Sep 10, 2019 at 10:36
  • To be honest, I don't quire understand the question. FTP has only one purpose - to transfer files. HTTP is a completely different protocol. Are you looking for an upload library or component that you can include in some JS code that you are writing? I can't imagine a stand-alone HTTP upload program. Sep 10, 2019 at 10:39
  • 1
    @Mawg, yes open source is a mandatory requirement.
    – guettli
    Sep 10, 2019 at 11:07
  • Do you have a preferred language for it to be coded in? Sep 10, 2019 at 11:38
  • 1
    @Mawg my preferred language is python.
    – guettli
    Sep 10, 2019 at 13:54

2 Answers 2

1

if the upload was successful, the files should get moved to a different directory. This probably is too specific for a tool to do. As you want it to be scriptable, why don't you do your custom python program? You already have an http client provided in Python (or the requests library, which seems to have a nicer API).

Python already is:

  • open source
  • scriptable
  • runs on linux/windows/mac

The part of moving your files when successful upload should be a one-liner in Python.

0

There is a command line tool called tbzuploader

tbzuploader - Generic HTTP Uploading

A lot of daily work is based on regular files.

tbzuploader is a command line tool which detects uploadable files and posts them via HTTP while conforming to the standardized HTTP Status Codes. Upload Protocol

tbzuploader conforms to the generally accepted upload protocol. 201 Created

If the HTTP upload is successful, the server responds with "201 Created". The files will then be moved to a "done" directory. 400 Bad Request

If the HTTP upload is not successful and it is a client error (such as wrong files or corrupted files), the server responds with "400 Bad Request". The files will then be moved to a "failed" directory.

In case you want to inform an admin, specify an email address which gets notified in that case, because failed files won't be retried. 500 Internal Server Error and others

If the HTTP upload was not successful (such as an login page, outage, programming error or overload), the server responds with other status codes (such as 500 Internal Server Error). tbzuploader will then retry to post the files next time.

Features

pairs of arbitrary size (tuples, triplets, etc.)

For example you have four files: a.pdf, a.xml, b.pdf, b.xml

The first upload should take a.pdf and a.xml, and the second upload b.pdf and b.xml. See the docs for --patterns.

mail to admin if broken files are uploaded

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.