feat: Add sourceUrl support for uploads#17
feat: Add sourceUrl support for uploads#17Nicolasara wants to merge 2 commits intochibisafe:masterfrom
Conversation
| const formData = new FormData(); | ||
| formData.append('file[]', image, `upload${fileExtension}`); | ||
| if (pageURL) { | ||
| formData.append('sourceUrl', pageURL); |
There was a problem hiding this comment.
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.
|
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. |
|
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 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. |
|
Nice! Happy to try it out once it's released. |
Description
Adds support for sending the current page URL as
sourceUrlwhen uploading files or screenshots via the extension.Changes
uploadFileanduploadScreenshotto includesourceUrlin theFormData.Linked Issue
Closes chibisafe/chibisafe#756