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 update uploaded file with new content

Sometimes you might need to rewrite a file on the server (e.g. statistics offloading every x weeks/days/hours/...). In this case, just path the "rewrite: 1" header on first upload:

curl https://bashupload.com/data.csv --data-binary @data.csv -H "rewrite: 1"

When uploaded you'll see the instructions for rewriting this file:

Uploaded 1 file, 1119 bytes

wget https://bashupload.com/CpmjE/data.csv

  To rewrite this file, use the following command:
  curl "https://bashupload.com/CpmjE/data.csv" -H "rewrite: 1" --data-binary @data.csv

So to rewrite the uploaded file, just use it's full path (with a key in it):

curl "https://bashupload.com/CpmjE/data.csv" -H "rewrite: 1" --data-binary @data.csv

You can now fetch data from this file to different sources. You can also append content to a file instead of overwriting it.


More articles