Skip to content

Instantly share code, notes, and snippets.

@DarkSeraphim
Created September 12, 2014 18:05
Show Gist options
  • Save DarkSeraphim/c9e4383f807a183936fa to your computer and use it in GitHub Desktop.
Save DarkSeraphim/c9e4383f807a183936fa to your computer and use it in GitHub Desktop.
ShareX for Linux config
{
# Here you can add multiple image uploaders
# They go in the format as shown below
# Btw I added a 'comment'
"apis":
[
# As JSON requires us to create a new 'object' each API
{
# A name is just a name for the GUI, all it should do
# is tell you where it will upload.
"name": "zack bb",
# What does the API serve?
"type": "image",
# The URL should point to the location where
# the API normally uploads. This is without any
# GET parameters
"url": "http://zackpollard.com/imageapi/",
# The method stands for the HTTP method,
# basically GET, POST, PUT, etc.
"method": "POST",
# The file is the POST index for the file
# In HTML, this is the 'name' attribute:
# <input type="file" name="This is the 'file' value"/>
"file": "",
# The response type as expected
# (Do we need this?)
"response-type": "",
# This allows you to filter out the URL from
# the response. Do note: it's using regular expressions :P
"response-filter":
[
# Each regular expression will be chained
# in the same order as shown here for
# effective use. If one doesn't match, it's ignored.
#
# Also makes them more readable and easier
# to fix in case of issues :3
"{\"key\":\"(.*?)\"}",
"{\"url\":\"(.*?)\"}"
],
# If your response is a simple key
# you might require to prefix or suffix
# you can do that with the next two entries
"response-prefix": "what should be in front of the response",
"response-suffix": "what should be after of the response",
# If you need some more headers
"optional-headers":
{
"opt": "value"
},
# If you need to supply extra parameters
"optional-parameters":
{
"key": "value"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment