Attachments API

Upload an image to a note

coming soon

Download an attachment

  • GET https://hackmd.io/_uploads/:filename
  • Url params:
    • filename: string
  • Authorization:
  • Success Response
    • Trigger the download
  • Sample usage
    โ€‹# -L option turn on the follow redirection
    โ€‹curl -H "Authorization: Bearer TOKEN" https://hackmd.io/_uploads/By9HvYLR6.png -L > output.png
    

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’
Note

  • Turn on the "follow redirection" option in your REST client.
  • You have to use the hackmd.io domain instead of the api.hackmd.io domain in regular APIs.