My Web Share Target does not work, I get the error "property 'action' ignored, should be within scope of manifest" when my PWA gets installed.
In the manifest.json I have configured the share_target as below:
"share_target": {
"action": "/_share-target",
"enctype": "multipart/form-data",
"method": "POST",
"params": {
"files": [
...
]
}
}
The problem was that my service worker got installed with scope '/myapp/src/'
This results in a absolute url https://myusername.github.io/myapp/src/ where the service worker runs.
But the web share target points to https://myusername.github.io/_share-target because of the leading slash, which is, as the error message states, not in scope of the service worker.
So the solution was to adjust the mainfest.json by removing the slash from the share target action property.
or define the path within the service worker scope: