Skip to content

Comments

feat: Add sourceUrl support for uploads#17

Open
Nicolasara wants to merge 2 commits intochibisafe:masterfrom
Nicolasara:feat/source-url
Open

feat: Add sourceUrl support for uploads#17
Nicolasara wants to merge 2 commits intochibisafe:masterfrom
Nicolasara:feat/source-url

Conversation

@Nicolasara
Copy link

Description

Adds support for sending the current page URL as sourceUrl when uploading files or screenshots via the extension.

Changes

  • background.js:
    • Updated uploadFile and uploadScreenshot to include sourceUrl in the FormData.
    • Updated context menu and message listeners to pass the current page URL.

Linked Issue

Closes chibisafe/chibisafe#756

const formData = new FormData();
formData.append('file[]', image, `upload${fileExtension}`);
if (pageURL) {
formData.append('sourceUrl', pageURL);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the decision to use the page url as the sourceUrl instead of the direct link to the file itself. Since ChibiSafe provides a new hosting link for the file, tracking the originating context seems better than just storing a duplicate technical URL. Alternatively, we could omit sourceUrl for these types of uploads and keep it exclusive to screenshots.

Open to any of the three options though.

@Nicolasara
Copy link
Author

Hi @Pitu, sending a PR for the client side change needed to populate data for the new source url added in chibisafe/chibisafe#758.

Also wanted to say thanks for your work on Chibisafe, it's an awesome open source project.

@Pitu
Copy link
Member

Pitu commented Dec 24, 2025

Hey @Nicolasara thanks for the PR. I have a new extension working that I was planning on releasing this week with a much improved UI, and that one already supports sourceUrl. So I'm gonna close this PR and release the new extension in the next few hours.

That being said, the extension wont be uploaded to the stores for a few days, I want a few people to try it before I push it.

@Nicolasara
Copy link
Author

Nice! Happy to try it out once it's released.

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.

[FEATURE REQUEST] Add support for saving the source URL when uploading screenshots

2 participants