Updated ShareX config

This commit is contained in:
Bobby Wibowo 2019-09-08 09:55:25 +07:00
parent 4bad86003c
commit 06ac266bbf
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
3 changed files with 12 additions and 12 deletions

View File

@ -4,12 +4,12 @@
lsKeys.siBytes = 'siBytes'
page.prepareShareX = function () {
const values = {
const values = page.token ? {
token: page.token || '',
albumid: page.album || '',
filelength: page.fileLength || '',
age: page.uploadAge || ''
}
albumid: page.album || ''
} : {}
values.filelength = page.filelength || ''
values.age = page.uploadAge || ''
const headers = []
const keys = Object.keys(values)
@ -24,13 +24,13 @@ page.prepareShareX = function () {
const sharexFile = `{
"Name": "${originClean}",
"DestinationType": "ImageUploader, FileUploader",
"RequestType": "POST",
"RequestMethod": "POST",
"RequestURL": "${location.protocol}//${origin}/api/upload",
"FileFormName": "files[]",
"Headers": {
${headers.join(',\n')}
},
"ResponseType": "Text",
"Body": "MultipartFormData",
"FileFormName": "files[]",
"URL": "$json:files[0].url$",
"ThumbnailURL": "$json:files[0].url$"
}`

View File

@ -1,16 +1,16 @@
{
"Name": "safe.fiery.me",
"DestinationType": "ImageUploader, FileUploader",
"RequestType": "POST",
"RequestMethod": "POST",
"RequestURL": "https://safe.fiery.me/api/upload",
"FileFormName": "files[]",
"Headers": {
"token": "",
"albumid": "",
"filelength": "",
"age": ""
},
"ResponseType": "Text",
"Body": "MultipartFormData",
"FileFormName": "files[]",
"URL": "$json:files[0].url$",
"ThumbnailURL": "$json:files[0].url$"
}

View File

@ -16,7 +16,7 @@
v3: CSS and JS files (libs such as bulma, lazyload, etc).
v4: Renders in /public/render/* directories (to be used by render.js).
#}
{% set v1 = "01mMpp1DzB" %}
{% set v1 = "gYwgjH5FFj" %}
{% set v2 = "hiboQUzAzp" %}
{% set v3 = "tWLiAlAX5i" %}
{% set v4 = "S3TAWpPeFS" %}