Include file size in the notification
Add environment variables to include the file size in the notification sent, like this:
APPRISE_FILESIZE="{filesize}" APPRISE_FILESIZE_UNIT="K"
Options are K, M, G, T for Kilobytes, Megabytes, Gigabytes and Terabytes, respectively. Add "B" after the UNIT letter when UNIT is not B. Default should be the nearest smallest number and unit, so if a file of 5.4GB is uploaded, present it as 5.4GB. If a file of 1,474,560 bytes is uploaded, present it as 1.44MB. If a 262,144 byte file is uploaded, present it as 256KB, and so on. I'm using 1024 for 1KB here.
Examples:
Kilobytes: File uploaded: BigFile.mkv (5 662 310 KB)
Megabytes: File uploaded: BigFile.mkv (5 529 MB)
Gigabytes: File uploaded: BigFile.mkv (5.4 GB)
Terabytes: File uploaded: TheInternet.zip (1 124 532 563 TB) 😄
@greirson Not sure if this is something you wanted to look at. If not I can look at implementing at a later date.
@greirson Not sure if this is something you wanted to look at. If not I can look at implementing at a later date.
@abiteman I'll take a crack at it if you want to assign this one over to me. Shouldn't be to much to implement.
Thanks!
Pushed with https://github.com/DumbWareio/DumbDrop/pull/16, Great idea @csjoh
I also added {storage} as an option to output the TOTAL amount of storage in use in the upload folder
Great work @greirson thank you!
Fo shizzle