You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem is solved by the new feature
Currently, in order to files into PairDrop, they are zipped, base64 encoded and this text is then copied to the clipboard. The user then pastes the string into the website via the Base64Dialog where it is processed into files again.
This process takes a while.
Describe the feature
Copy the files themselves to the clipboard and pasting them directly onto the page without the need to process them.
As pasting files onto the background is already implemented the user only needs an info.
It's probably best to reuse the Base64Dialog anyway: One big button: "Click to paste files".
Implement PasteDialog analogously to the Base64Dialog and initiateable via ?init=paste -> Pasting into it should behave as pasting into the Background
Edit the iOS shortcut to simply copy the shortcut inputs instead of processing them (if not a string or folder).
Edit the pairdrop-cli to copy the complete files instead of their contents
On iOS it seems possible to startup standalone PWAs by using the scheme webapp:// like so: webapp://pairdrop.net/
With this, we can actually open the PWA which is great! Inconveniently, this does not work as deep links but always opens the start_url, so webapp://pairdrop.net/?init=pair will just open / as this is the start_url for the PWA from https://pairdrop.net/.
Sadly, when images are copied on iOS their file name is lost. Also, copying and pasting files from the file manager does not work if the files are not images. For that reason, we might need to use the Base64Dialog anyway.
Initiation Files:
User shares files / text via shortcut
Files are zipped and base64 encoded, Text is just base64 encoded (base64 string)
Base64 string is prefixed with a special string: @@@pairdropBase64paste;files; or @@@pairdropBase64paste;files; (result: data string)
The PWA is opened via webapp:// and the user gets notified via a shortcut notification that the content is in the clipboard ready to be pasted.
User pastes onto the background or via the click/paste button onto the SelectDialog.
PairDrop detects that the pasted content is text and that it is prefixed by @@@pairdropBase64paste;. It then shows the Base64Dialog as processing... and processes the base64 string with files or text as type as before.
Only use the hash method for shorter texts if the domain is prefixed with https:// and not webapp:// as it is cut otherwise.
Additionally, (if https:// is set) the shortcut adds ?base64=paste to the URL so that domains that open in the browser (https:// instead of webapp://) still opens the base64Dialog. A new method must then strip the prefix from the pasted content and call the respective processing method.
If the content is text and it is prefixed, we could just check for the clipboard content every time the PWA is started, without asking for the user to paste it. That's one less step for the user. If the content is prefixed, automatically start share mode
What problem is solved by the new feature
Currently, in order to files into PairDrop, they are zipped, base64 encoded and this text is then copied to the clipboard. The user then pastes the string into the website via the Base64Dialog where it is processed into files again.
This process takes a while.
Describe the feature
Copy the files themselves to the clipboard and pasting them directly onto the page without the need to process them.
As pasting files onto the background is already implemented the user only needs an info.
It's probably best to reuse the Base64Dialog anyway: One big button: "Click to paste files".
?init=paste
-> Pasting into it should behave as pasting into the BackgroundAdditional context
See discussion in #370
The text was updated successfully, but these errors were encountered: