Hacker News new | ask | show | jobs
by microcolonel 2587 days ago
Yeah, I've dealt with SFTP + CSV workflows and it's not so bad. I ended up writing a virtual SFTP server which was not backed by a filesystem, and which would prevent malformed data from being written, and make closed/authoritative files immutable.

It's obviously not ideal, compared to a well-thought-out purpose-built API and a complete set of tools, but that takes work, and isn't always better faster than the refined hack.

1 comments

Wouldn't it be simpler to upload a file with a tmp name and then at the end rename the file if there was no error? Renaming is pretty much an atomic operation.
It would be, but they might not have the latitude to dictate the connection AND it might be multiple-file batches.