Skip to content

fix: image uploader setting import - #6387

Merged
pajlada merged 12 commits into
Chatterino:masterfrom
x3rt:fix/sxcu-import
Aug 28, 2025
Merged

pajlada merged 12 commits into
Chatterino:masterfrom
x3rt:fix/sxcu-import

Conversation

@x3rt

@x3rt x3rt commented Aug 11, 2025 •

Copy link
Copy Markdown
Contributor
  • If multiple headers are defined in the sxcu they would be stored delimited by a \n newline character, instead of the expected ; semicolon causing uploads to use invalid headers
  • The URL and DeletionURL settings would store the raw string meaning ShareX's {response} or {json:files[0].url} would be stored as such and therefore getLinkFromResponse would not parse the response correctly.

This PR attempts to fix the above.
As this is my first time working with Chatterino's code I expect there to be things to nit-pick about my changes. I did attempt my best to follow the Contributing guidelines & match the format of other functions.

Some things to note;

  1. I'm unsure whether you wish to support converting back to proper ShareX formatting during export.

@Nerixyz

Nerixyz commented Aug 14, 2025

Copy link
Copy Markdown
Contributor
  1. I'm unsure whether you wish to support converting back to proper ShareX formatting during export.

Yes, we do want to be ShareX compatible - we even advertise this.

In #6394 I added some test for this, because there were none. Once this gets merged, you can add more tests here and update the snapshots (change UPDATE_SNAPSHOTS to true, rerun tests, and reset UPDATE_SNAPSHOTS to false).

@pajlada

pajlada commented Aug 16, 2025

Copy link
Copy Markdown
Member

If you could fix the tests to update the "new reality" that'd be great.
The changes look fine from my perspective

@x3rt

x3rt commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

Will do so when available

@Nerixyz Nerixyz mentioned this pull request Aug 26, 2025
7 of 12 tasks
Comment thread src/util/ImageUploader.cpp
@pajlada

pajlada commented Aug 28, 2025

Copy link
Copy Markdown
Member

Somewhat unrelated: in 9210736 (#6387) I removed the requirement for the Name field in the sxcu file. I now instead check that the RequestURL field exists, which exists in both ShareX's format & our format.

In 5405f0f (#6387) I added a few snapshot tests for testing the jsonpath feature - as far as I can tell from my brief testing this now works as expected. My sharex uploader settings I've tested has been very small though, so happy to have someone else test this as well.

@pajlada
pajlada enabled auto-merge (squash) August 28, 2025 21:50
@pajlada
pajlada merged commit c7a7740 into Chatterino:master Aug 28, 2025
@pajlada

pajlada commented Aug 29, 2025

Copy link
Copy Markdown
Member

Thank you @x3rt! As a first-time contributor, you are now eligible to be listed in the About page in Chatterino.

If you want this, you can open a new PR where you modify the resources/contributors.txt file and add yourself to the list. Read the comments at the top for instructions.

babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants