Skip to content

Instantly share code, notes, and snippets.

@BobbyWibowo
Created February 19, 2021 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BobbyWibowo/c19453fbbeeaf7b5b01c8b02a3d9d8e4 to your computer and use it in GitHub Desktop.
Save BobbyWibowo/c19453fbbeeaf7b5b01c8b02a3d9d8e4 to your computer and use it in GitHub Desktop.
curl \
-H "token: YOUR_TOKEN_HERE" \
-H "albumid: YOUR_ALBUM_ID_HERE" \
-H "filelength: NUMBER_FROM_5_TO_32" \
-H "age: HOURS" \
-H "striptags: 1_IF_YES" \
-F "files[]=@PATH_TO_FILE" \
https://safe.fiery.me/api/upload
@BobbyWibowo
Copy link
Author

BobbyWibowo commented Feb 19, 2021

NOTES

  • All headers are optional.
  • filelength header is the length of the random identifier assigned to the uploaded files.
    For example: 5 chars: https://i.fiery.me/a63Zd.jpg, 10 chars: https://i.fiery.me/Sza63ZdFd3.zip.
  • age header will only accept exact valid values in safe.fiery.me homepage, but in hours.
    For example, if the homepage only allows 1, 3, and 7 days, their values are 24, 72, and 168 respectively.
    Other example of shorter ages, such as 15 and 30 minutes, their values are 0.25 and 0.5 respectively.
    If off, or entirely invalid altogether, the files will still be uploaded and assigned the default age (in safe.fiery.me, it's permanent).
  • API responses are in JSON format.

EXAMPLES

curl \
  -H "token: MY_TOKEN" \
  -H "albumid: 420" \
  -H "filelength: 16" \
  -H "striptags: 1" \
  -F "files[]=@MY_PHOTO.jpg" \
  https://safe.fiery.me/api/upload
curl \
  -H "age: 72" \
  -F "files[]=@tmp.txt" \
  https://safe.fiery.me/api/upload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment