Repository navigation
fix(pastebin): copy the pastebin view link after creating a pastebin - #629
Merged
Merged
Conversation
Creating a pastebin copied the raw share link, which opens the folder with manifest.json and revisions/ instead of the pastebin. Copy the link to the pastebin view instead, built like the view's own copy button but with buildUrl, so it points to where web is served rather than to the backend URL.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
After creating a pastebin, the app copied the raw share link (
/s/<token>), which opens the folder withmanifest.jsonandrevisions/. It now copies the link to the pastebin view (/pastebin/view/public/<token>), the same one the "Copy public link" button in the view uses. The toast shows it too.Both places now share one helper. It resolves the
pastebin-viewroute and builds the absolute URL withbuildUrlfrom web-pkg, instead of joiningconfigStore.serverUrl(the backend URL) with a hard-coded path. So the link also points to the right place when web is served from a different origin or base path.opencloud-eu/web#3798 lets
buildUrltake the route location directly. Once a release with it is the minimum, the extrarouter.resolvecan go.Related Issue
How Has This Been Tested?
opencloud-rolling:8.1.0) with a development build of the appcreatePastebinnow reads the clipboard after "Create Pastebin". "public link works unauthenticated" checks that the copied link ends in/pastebin/view/public/<token>, matches the header button link, and opens with the link password without login. It fails onmain(/s/<token>) and passes with this change.Types of changes