add documentation for new features

This commit is contained in:
schlagmichdoch 2023-01-19 19:07:43 +01:00
parent 469d3f6ec8
commit d6d5663ac4
7 changed files with 86 additions and 29 deletions

View file

@ -5,12 +5,10 @@ First, [Install docker with docker-compose.](https://docs.docker.com/compose/ins
Then, clone the repository and run docker-compose:
```shell
git clone https://github.com/schlagmichdoch/pairdrop.git
```
```shell
cd pairdrop
```
```shell
git clone https://github.com/schlagmichdoch/PairDrop.git
cd PairDrop
docker-compose up -d
```
Now point your browser to `http://localhost:8080`.
@ -103,7 +101,7 @@ server {
expires epoch;
location / {
root /var/www/pairdrop/client;
root /var/www/pairdrop/public;
index index.html index.htm;
}
@ -124,7 +122,7 @@ server {
expires epoch;
location / {
root /var/www/pairdrop/client;
root /var/www/pairdrop/public;
index index.html;
}
@ -141,7 +139,7 @@ server {
### Using Apache
```
<VirtualHost *:80>
DocumentRoot "/var/www/pairdrop/client"
DocumentRoot "/var/www/pairdrop/public"
DirectoryIndex index.html
RewriteEngine on
@ -150,7 +148,7 @@ server {
RewriteRule ^/?(.*) "ws://127.0.0.1:3000/$1" [P,L]
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/var/www/pairdrop/client"
DocumentRoot "/var/www/pairdrop/public"
DirectoryIndex index.html
RewriteEngine on
@ -173,7 +171,7 @@ When running PairDrop via Docker, the `X-Forwarded-For` header has to be set by
Use nginx or apache to set the header correctly:
### Using nginx
(This differs from the config under `/docker/nginx/default.conf)
(This differs from `/docker/nginx/production.conf`)
```
server {
listen 80;
@ -203,12 +201,12 @@ server {
location / {
proxy_connect_timeout 300;
proxy_pass http://127.0.0.1:443;
proxy_pass http://127.0.0.1:8443;
}
location /server {
proxy_connect_timeout 300;
proxy_pass http://127.0.0.1:443;
proxy_pass http://127.0.0.1:8443;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-for $remote_addr;

37
docs/how-to.md Normal file
View file

@ -0,0 +1,37 @@
## Share files directly form context menu on Windows
### Registering to open files with PairDrop
The [File Handling API](https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/handle-files) is implemented
This is still experimental and must be enabled via a flag **before** the PWA is installed to Windows.
1. [Enabled feature in Edge](https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/handle-files#enable-the-file-handling-api)
2. Install PairDrop by visiting https://pairdrop.net/ with the Edge browser and install it as described [here](faq.md#help--i-cant-install-the-pwa-).
3. You are done! You can now send most files one at a time via PairDrop:
_context menu > Open with > PairDrop_
[//]: # (Todo: add screenshots)
### Sending multiple files to PairDrop
Outstandingly, it is also possible to send multiple files to PairDrop via the context menu by adding PairDrop to the `Send to` menu:
1. [Register PairDrop as file handler](#registering-to-open-files-with-pairdrop)
2. Hit Windows Key+R, type: `shell:programs` and hit Enter.
3. Copy the PairDrop shortcut from the directory
4. Hit Windows Key+R, type: `shell:sendto` and hit Enter.
5. Paste the copied shortcut into the directory
6. You are done! You can now send multiple files (but no directories) directly via PairDrop:
_context menu > Send to > PairDrop_
[//]: # (Todo: add screenshots)
## Share directly from share menu on iOS
implemented but not documented yet
[//]: # (Todo: add shortcut to routinehub.co and add doku with screenshots)
## Share directly from share menu on Android
The [Web Share Target API](https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target) is implemented but not yet tested.
When the PWA is installed, it should register itself to the share-menu of the device automatically.
Please test this feature and create an issue if it does not work.

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Before After
Before After