2023-01-19 19:24:09 +01:00
|
|
|
# How-To
|
2023-01-19 19:07:43 +01:00
|
|
|
|
2023-02-22 02:22:51 +01:00
|
|
|
## Send directly from share menu on iOS
|
2023-07-08 13:17:35 +00:00
|
|
|
I created an iOS shortcut to send images, files, folder, URLs \
|
|
|
|
or text directly from the share-menu
|
2023-01-20 18:45:42 +01:00
|
|
|
https://routinehub.co/shortcut/13990/
|
2023-01-19 19:07:43 +01:00
|
|
|
|
2023-12-06 11:01:27 +01:00
|
|
|
[//]: # (Todo: Add screenshots)
|
2023-01-19 19:07:43 +01:00
|
|
|
|
2023-12-06 11:01:27 +01:00
|
|
|
<br>
|
2023-01-19 19:07:43 +01:00
|
|
|
|
2023-02-22 02:22:51 +01:00
|
|
|
## Send directly from share menu on Android
|
2023-03-28 20:24:46 +02:00
|
|
|
The [Web Share Target API](https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target) is implemented.
|
|
|
|
|
|
|
|
When the PWA is installed, it will register itself to the share-menu of the device automatically.
|
2023-01-19 19:07:43 +01:00
|
|
|
|
2023-12-06 11:01:27 +01:00
|
|
|
<br>
|
2023-02-22 02:22:51 +01:00
|
|
|
|
|
|
|
## Send directly via command-line interface
|
2023-12-06 11:01:27 +01:00
|
|
|
Send files or text with PairDrop via command-line interface. \
|
2023-02-22 02:22:51 +01:00
|
|
|
This opens PairDrop in the default browser where you can choose the receiver.
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
```bash
|
2023-12-06 11:01:27 +01:00
|
|
|
pairdrop -h
|
|
|
|
```
|
2024-01-04 18:12:08 +01:00
|
|
|
```
|
2023-12-06 11:01:27 +01:00
|
|
|
Send files or text with PairDrop via command-line interface.
|
|
|
|
Current domain: https://pairdrop-dev.onrender.com/
|
2023-02-22 02:22:51 +01:00
|
|
|
|
|
|
|
Usage:
|
2023-12-06 11:01:27 +01:00
|
|
|
Open PairDrop: pairdrop
|
|
|
|
Send files: pairdrop file1/directory1 (file2/directory2 file3/directory3 ...)
|
|
|
|
Send text: pairdrop -t "text"
|
|
|
|
Specify domain: pairdrop -d "https://pairdrop.net/"
|
|
|
|
Show this help text: pairdrop (-h|--help)
|
2023-02-22 02:22:51 +01:00
|
|
|
|
2024-01-04 18:12:08 +01:00
|
|
|
This pairdrop-cli version was released alongside v1.10.4
|
2023-12-06 11:01:27 +01:00
|
|
|
```
|
2023-02-22 02:22:51 +01:00
|
|
|
|
2023-12-06 11:01:27 +01:00
|
|
|
<br>
|
2023-02-22 02:22:51 +01:00
|
|
|
|
|
|
|
### Setup
|
|
|
|
|
2024-01-06 15:13:48 +01:00
|
|
|
#### Linux / Mac
|
2023-12-06 11:01:27 +01:00
|
|
|
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
|
2024-01-06 15:13:48 +01:00
|
|
|
```shell
|
2024-01-21 20:09:11 +01:00
|
|
|
wget "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.10.6/pairdrop-cli.zip"
|
2024-01-06 15:13:48 +01:00
|
|
|
```
|
|
|
|
or
|
|
|
|
```shell
|
2024-01-21 20:09:11 +01:00
|
|
|
curl -LO "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.10.6/pairdrop-cli.zip"
|
2024-01-06 15:13:48 +01:00
|
|
|
```
|
|
|
|
2. Unzip the archive to a folder of your choice e.g. `/usr/share/pairdrop-cli/`
|
|
|
|
```shell
|
|
|
|
sudo unzip pairdrop-cli.zip -d /usr/share/pairdrop-cli/
|
|
|
|
```
|
|
|
|
3. Copy the file _.pairdrop-cli-config.example_ to _.pairdrop-cli-config_
|
|
|
|
```shell
|
|
|
|
sudo cp /usr/share/pairdrop-cli/.pairdrop-cli-config.example /usr/share/pairdrop-cli/.pairdrop-cli-config
|
|
|
|
```
|
|
|
|
4. Make the bash file _pairdrop_ executable
|
|
|
|
```shell
|
|
|
|
sudo chmod +x /usr/share/pairdrop-cli/pairdrop
|
|
|
|
```
|
|
|
|
5. Add a symlink to /usr/local/bin/ to include _pairdrop_ to _PATH_
|
|
|
|
```shell
|
|
|
|
sudo ln -s /usr/share/pairdrop-cli/pairdrop /usr/local/bin/pairdrop
|
|
|
|
```
|
2023-02-22 02:22:51 +01:00
|
|
|
|
2023-12-06 11:01:27 +01:00
|
|
|
<br>
|
|
|
|
|
2023-02-22 02:22:51 +01:00
|
|
|
#### Windows
|
2023-12-06 11:01:27 +01:00
|
|
|
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
|
|
|
|
2. Put file in a preferred folder e.g. `C:\Program Files\pairdrop-cli`
|
2024-01-06 15:13:48 +01:00
|
|
|
3. Inside this folder, copy the file _.pairdrop-cli-config.example_ to _.pairdrop-cli-config_
|
|
|
|
4. Search for and open `Edit environment variables for your account`
|
|
|
|
5. Click `Environment Variables…`
|
|
|
|
6. Under _System Variables_ select `Path` and click _Edit..._
|
|
|
|
7. Click _New_, insert the preferred folder (`C:\Program Files\pairdrop-cli`), click *OK* until all windows are closed
|
|
|
|
8. Reopen Command prompt window
|
2023-12-06 11:01:27 +01:00
|
|
|
|
2024-01-06 15:13:48 +01:00
|
|
|
**Requirements**
|
2023-12-06 11:01:27 +01:00
|
|
|
|
|
|
|
As Windows cannot execute bash scripts natively, you need to install [Git Bash](https://gitforwindows.org/).
|
2024-01-06 15:13:48 +01:00
|
|
|
|
|
|
|
Then, you can also use pairdrop-cli from the default Windows Command Prompt
|
|
|
|
by using the shell file instead of the bash file which then itself executes
|
|
|
|
_pairdrop-cli_ (the bash file) via the Git Bash.
|
|
|
|
```shell
|
|
|
|
pairdrop.sh -h
|
|
|
|
```
|
2023-12-06 11:01:27 +01:00
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
## Send multiple files and directories directly from context menu on Windows
|
|
|
|
|
|
|
|
### Registering to open files with PairDrop
|
|
|
|
It is possible to send multiple files with PairDrop via the context menu by adding pairdrop-cli to Windows `Send to` menu:
|
|
|
|
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
|
|
|
|
2. Unzip the archive to a folder of your choice e.g. `C:\Program Files\pairdrop-cli\`
|
2024-01-06 15:13:48 +01:00
|
|
|
3. Inside this folder, copy the file _.pairdrop-cli-config.example_ to _.pairdrop-cli-config_
|
|
|
|
4. Copy the shortcut _send with PairDrop.lnk_
|
|
|
|
5. Hit Windows Key+R, type: `shell:sendto` and hit Enter.
|
|
|
|
6. Paste the copied shortcut into the directory
|
|
|
|
7. Open the properties window of the shortcut and edit the link field to point to _send-with-pairdrop.ps1_ located in the folder you used in step 2: \
|
2023-12-06 11:01:27 +01:00
|
|
|
`"C:\Program Files\PowerShell\7\pwsh.exe" -File "C:\Program Files\pairdrop-cli\send-with-pairdrop.ps1"`
|
2024-01-06 15:13:48 +01:00
|
|
|
8. You are done! You can now send multiple files and directories directly via PairDrop:
|
2023-12-06 11:01:27 +01:00
|
|
|
|
2024-01-06 15:13:48 +01:00
|
|
|
_context menu_ > _Send to_ > _PairDrop_
|
2023-12-06 11:01:27 +01:00
|
|
|
|
|
|
|
##### Requirements
|
|
|
|
As Windows cannot execute bash scripts natively, you need to install [Git Bash](https://gitforwindows.org/).
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
## Send multiple files and directories directly from context menu on Ubuntu using Nautilus
|
|
|
|
|
|
|
|
### Registering to open files with PairDrop
|
|
|
|
It is possible to send multiple files with PairDrop via the context menu by adding pairdrop-cli to Nautilus `Scripts` menu:
|
2024-01-06 15:13:48 +01:00
|
|
|
1. Register _pairdrop_ as executable via [guide above](#linux).
|
|
|
|
2. Copy the shell file _send-with-pairdrop_ to `~/.local/share/nautilus/scripts/` to include it in the context menu
|
|
|
|
```shell
|
|
|
|
cp /usr/share/pairdrop-cli/send-with-pairdrop ~/.local/share/nautilus/scripts/
|
|
|
|
```
|
|
|
|
3. Make the shell file _send-with-pairdrop_ executable
|
|
|
|
```shell
|
|
|
|
chmod +x ~/.local/share/nautilus/scripts/send-with-pairdrop`
|
|
|
|
```
|
|
|
|
4. You are done! You can now send multiple files and directories directly via PairDrop:
|
|
|
|
|
|
|
|
_context menu_ > _Scripts_ > _send-with-pairdrop_
|
2023-12-06 11:01:27 +01:00
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
## File Handling API
|
|
|
|
The [File Handling API](https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/handle-files)
|
|
|
|
was implemented, but it was removed as default file associations were overwritten ([#17](https://github.com/schlagmichdoch/PairDrop/issues/17),
|
|
|
|
[#116](https://github.com/schlagmichdoch/PairDrop/issues/116) [#190](https://github.com/schlagmichdoch/PairDrop/issues/190))
|
2024-01-06 15:13:48 +01:00
|
|
|
and it only worked with explicitly specified file types and couldn't handle directories at all.
|
2023-02-12 02:30:07 +01:00
|
|
|
|
|
|
|
[< Back](/README.md)
|