Hacker News new | past | comments | ask | show | jobs | submit login

It was surprisingly easy to configure ShareX to work with Horizon! Handles deletion and putting the URL of the uploaded file in the clipboard and all.

Hopefully you guys could collaborate to become a default file/image destination uploader that actually handles logging in and logging out of an account.

https://i.horizon.pics/35dwiVGxz8 <-- Uploaded via ShareX.

```

// Uploader import string

  {
    "Version": "16.1.0",
    "Name": "horizon.pics",
    "DestinationType": "ImageUploader",
    "RequestMethod": "POST",
    "RequestURL": "https://api.horizon.pics/upload",
    "Headers": {
      "Cookie": "token=YOUR_SESSION_HERE"
    },
    "Body": "MultipartFormData",
    "FileFormName": "file",
    "URL": "{json:.data.fileLink}",
    "DeletionURL": "{json:.data.deleteLink}",
    "ErrorMessage": "{json:.message}"
  }
```



Hey, please don't do this! Your cookie token is actually ephemeral. You have a permanent upload key assigned to your account. Download the ShareX config from Settings > General > App Configuration.


Wow. So you already provide a ShareX Custom Uploader configuration file on your website. I wasn't expecting that. I expected it so little that I didn't even bother searching.

So it works basically the same as mine but instead of the shitty cookie workaround I did, you have a header called "Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" that won't blow up in my face every few weeks

Very nice




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: