ShareX URL Delete compatibility
This commit is contained in:
parent
df5b563de5
commit
0f0753ad60
|
@ -10,6 +10,10 @@ import (
|
|||
|
||||
func deleteHandler(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||
requestKey := r.Header.Get("Linx-Delete-Key")
|
||||
urlRequestKey := r.URL.Query().Get("linx-delete-key")
|
||||
if len(urlRequestKey) > 0 {
|
||||
requestKey := urlRequestKey
|
||||
}
|
||||
|
||||
filename := c.URLParams["name"]
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"Version": "13.1.0",
|
||||
"DestinationType": "ImageUploader, FileUploader",
|
||||
"RequestMethod": "PUT",
|
||||
"RequestURL": "https://put.icu/upload/",
|
||||
"Headers": {
|
||||
"Accept": "application/json"
|
||||
},
|
||||
"Body": "Binary",
|
||||
"URL": "$json:url$"
|
||||
}
|
|
@ -212,6 +212,8 @@ func setup() *web.Mux {
|
|||
mux.Put(Config.sitePath+"upload/:name", uploadPutHandler)
|
||||
|
||||
mux.Delete(Config.sitePath+":name", deleteHandler)
|
||||
// Adding new delete path method to make linx-server usable with ShareX.
|
||||
mux.Get(Config.sitePath+"delete/:name", deleteHandler)
|
||||
|
||||
mux.Get(Config.sitePath+"static/*", staticHandler)
|
||||
mux.Get(Config.sitePath+"favicon.ico", staticHandler)
|
||||
|
|
Loading…
Reference in New Issue