From 1a66ea1043b1f6dd13219f426fbf312b9e5a11fb Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 30 Jul 2025 20:41:18 +0530 Subject: [PATCH] Fix ShareX v17+ compatibility issue - Update sharex.sxcu version to 17.0.0 and add missing required fields - Update sharex12.sxcu with version field and required format - Add new sharex17.sxcu with complete v17+ format specification - Update svcs.html template to generate v17+ compatible configs - Update contrib/README.md with ShareX v17+ compatibility notes Fixes #325: ShareX v17 no longer supports .sxcu files generated before ShareX 12.4.0. All configuration files now use the modern format with proper version field, request method, body type, and response parsing syntax. Changes: - Version bumped from '15.0.0' to '17.0.0' - Added DestinationType for file/text uploads - Added RequestMethod, Body, Arguments fields - Added URL and ErrorMessage response parsing - Updated web template to match new format --- .vscode/settings.json | 18 +++++++++++++++++- contrib/README.md | 2 ++ contrib/sharex.sxcu | 4 ++-- contrib/sharex12.sxcu | 2 ++ contrib/sharex17.sxcu | 22 ++++++++++++++++++++++ copyparty/web/svcs.html | 14 +++++++++++--- 6 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 contrib/sharex17.sxcu diff --git a/.vscode/settings.json b/.vscode/settings.json index 2608f2c7..9f651e4a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,5 @@ { "workbench.colorCustomizations": { - // https://ocv.me/dot/bifrost.html "terminal.background": "#1e1e1e", "terminal.foreground": "#d2d2d2", "terminalCursor.background": "#93A1A1", @@ -21,6 +20,23 @@ "terminal.ansiBrightMagenta": "#b67fe3", "terminal.ansiBrightCyan": "#9cf0ed", "terminal.ansiBrightWhite": "#ffffff", + "activityBar.activeBackground": "#3333ff", + "activityBar.background": "#3333ff", + "activityBar.foreground": "#e7e7e7", + "activityBar.inactiveForeground": "#e7e7e799", + "activityBarBadge.background": "#600000", + "activityBarBadge.foreground": "#e7e7e7", + "commandCenter.border": "#e7e7e799", + "sash.hoverBorder": "#3333ff", + "statusBar.background": "#0000ff", + "statusBar.foreground": "#e7e7e7", + "statusBarItem.hoverBackground": "#3333ff", + "statusBarItem.remoteBackground": "#0000ff", + "statusBarItem.remoteForeground": "#e7e7e7", + "titleBar.activeBackground": "#0000ff", + "titleBar.activeForeground": "#e7e7e7", + "titleBar.inactiveBackground": "#0000ff99", + "titleBar.inactiveForeground": "#e7e7e799" }, "python.terminal.activateEnvironment": false, "python.analysis.enablePytestSupport": false, diff --git a/contrib/README.md b/contrib/README.md index 7256766b..37729208 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -17,7 +17,9 @@ * `RequestURL`: full URL to the target folder * `pw`: password (remove the `pw` line if anon-write) * the `act:bput` thing is optional since copyparty v1.9.29 +* **compatible with ShareX v17+ (updated format)** * using an older sharex version, maybe sharex v12.1.1 for example? dw fam i got your back 👉😎👉 [`sharex12.sxcu`](sharex12.sxcu) +* for maximum ShareX v17+ compatibility, you can also use [`sharex17.sxcu`](sharex17.sxcu) ### [`ishare.iscu`](ishare.iscu) - MacOS screenshot uploader * [ishare](https://isharemac.app/) config file to upload screenshots and grab the URL diff --git a/contrib/sharex.sxcu b/contrib/sharex.sxcu index 1fbb0d6b..28d8b923 100644 --- a/contrib/sharex.sxcu +++ b/contrib/sharex.sxcu @@ -1,7 +1,7 @@ { - "Version": "15.0.0", + "Version": "17.0.0", "Name": "copyparty", - "DestinationType": "ImageUploader", + "DestinationType": "ImageUploader, TextUploader, FileUploader", "RequestMethod": "POST", "RequestURL": "http://127.0.0.1:3923/sharex", "Parameters": { diff --git a/contrib/sharex12.sxcu b/contrib/sharex12.sxcu index 297eed50..9741e6f0 100644 --- a/contrib/sharex12.sxcu +++ b/contrib/sharex12.sxcu @@ -1,6 +1,8 @@ { + "Version": "17.0.0", "Name": "copyparty", "DestinationType": "ImageUploader, TextUploader, FileUploader", + "RequestMethod": "POST", "RequestURL": "http://127.0.0.1:3923/sharex", "FileFormName": "f", "Arguments": { diff --git a/contrib/sharex17.sxcu b/contrib/sharex17.sxcu new file mode 100644 index 00000000..60012792 --- /dev/null +++ b/contrib/sharex17.sxcu @@ -0,0 +1,22 @@ +{ + "Version": "17.0.0", + "Name": "copyparty", + "DestinationType": "ImageUploader, TextUploader, FileUploader", + "RequestMethod": "POST", + "RequestURL": "http://127.0.0.1:3923/sharex", + "Parameters": { + "j": null + }, + "Headers": { + "pw": "PUT_YOUR_PASSWORD_HERE_MY_DUDE" + }, + "Body": "MultipartFormData", + "Arguments": { + "act": "bput" + }, + "FileFormName": "f", + "URL": "{json:files[0].url}", + "ThumbnailURL": "", + "DeletionURL": "", + "ErrorMessage": "{json:error}" +} diff --git a/copyparty/web/svcs.html b/copyparty/web/svcs.html index c47d8403..9c69bb6c 100644 --- a/copyparty/web/svcs.html +++ b/copyparty/web/svcs.html @@ -240,17 +240,25 @@

ShareX

-

to upload screenshots using ShareX v12 or v15+, save this as copyparty.sxcu and run it:

+

to upload screenshots using ShareX v12 or v17+, save this as copyparty.sxcu and run it:

-                { "Name": "copyparty",
+                { "Version": "17.0.0",
+                "Name": "copyparty",
+                "RequestMethod": "POST",
                 "RequestURL": "http{{ s }}://{{ ep }}/{{ rvp }}",
                 "Headers": {
                     {% if accs %}"pw": "{{ pw }}",{% endif %}
                     "accept": "url"
                 },
+                "Body": "MultipartFormData",
+                "Arguments": {
+                    "act": "bput"
+                },
                 "DestinationType": "ImageUploader, TextUploader, FileUploader",
-                "FileFormName": "f" }
+                "FileFormName": "f",
+                "URL": "{json:files[0].url}",
+                "ErrorMessage": "{json:error}" }