bashupload is a place to upload files from command line or other devices and download them elsewhere during 7 days. Upload files now.

How to append text content to uploaded file

Instead of uploading a new file everytime, you can append new content to the same file that was uploaded earlier. That becomes handy when you offload statistics/logs from multiple nodes and need to merge that.

First, you have to init feed. Upload first file (from the bunch) with the additional "feed: 1" header:

curl "https://bashupload.com/access.log" -H "feed: 1" --data-binary @access.log

You'll see standard output with additonal feed key to continue feeding to the same file:

Fed 39945 bytes to access.log on "xDRD" key
Total feed size 39945 bytes

wget https://bashupload.com/xDRD/access.log

To continue feeding more data to this file use:
curl "https://bashupload.com/access.log" -H "feed-key: xDRD" --data-binary @access.log

On the next uploads just use the feed-key header from the initial upload instruction:

curl "https://bashupload.com/name.txt" -H "feed-key: xDRD" --data-binary @access.log.1

After that you can download the file with consolidated contents from two uploads or feed more data:

Fed 127416 bytes to access.log on "xDRD" key
Total feed size 167361 bytes

wget https://bashupload.com/xDRD/access.log

To continue feeding more data to this file use:
curl "https://bashupload.com/access.log" -H "feed-key: xDRD" --data-binary @access.log

You can also overwrite uploaded file completly instead of appending data to it.


More articles