cristofayre has asked for the wisdom of the Perl Monks concerning the following question:

I've not started to develop this yet, but just thought I would see if it was technically possible.

I know I can use PERL to read a photo file from a local SD card, and place it on my web hosting space. I fairly certain I can then use perl to OAUTH to another server, and upload said photo to their machine. However, as the photo file may be around 8mb, (and there could be 100 - 250 to process) I'm wondering if it would be THEORETICALLY possible to cut out the middle man. In otherwords, "pipe" the file I'm uploading directly to the OAUTH vendor's site. (I'm thinking an 8MB file read into shared server memory is going to be a bit of an overhead for the CPU)

I'll admit, I've never used OAUTH and its username / tokens, and don't know if I would have to get a new token for each photo upload I do. That too is part of the learning curve.

Replies are listed 'Best First'.
Re: My server as intermediate FTP
by chenhonkhonk (Acolyte) on Feb 22, 2019 at 18:46 UTC

    Is there a system tool you can use? It's pretty easy to pipe data in Perl, so I imagine you could just feed it to a pipe to a command-line tool, or refer the tool to a file and then have the tool send it.

    Perl does have some UDP/TCP functionality, so you can check if someone's made a library already to do a "you: sending filename and write settings" "reply: ready to receive" "you: $data"