Describe the bug
If i share a file, e.g. an image, the function createSharedFileUrl of the ShareViewController passes to many /
file%3A%2F%2F%2Fprivate%2Fvar%2Fmobile%2FContainers%2FShared%2FAppGroup%2F1C0BA5F1-DE70-123D-8435-1F125779A3CE%2F%2FIMG_0029.PNG
file:///private/var/mobile/Containers/Shared/AppGroup/1C0BA5F1-DE70-123D-8435-1F125779A3CE//IMG_0029.PNG
So, i get file:/// and //filename.PNG
I can remove the + "/" + from inside the createSharedFileUrl which helps with the // in front of the filename, but i cant figure out how to remove one of the /// without manipulating the file url itself.
To Reproduce
Steps to reproduce the behavior:
- Create an Capacitor App with the given send-intent example
- Share a File with the App
- App cant handle File because of too many
/
Expected behavior
The shared file url should look like that:
file%3A%2F%2Fprivate%2Fvar%2Fmobile%2FContainers%2FShared%2FAppGroup%2F1C0BA5F1-DE70-123D-8435-1F125779A3CE%2FIMG_0029.PNG
file://private/var/mobile/Containers/Shared/AppGroup/1C0BA5F1-DE70-123D-8435-1F125779A3CE/IMG_0029.PNG
Additional context
Currently working with "send-intent": "^3.0.12"
Inside of my Capacitor/Angular App i have added some sort of Workaround for that. Its definitely not pretty, but it works. But i also want to get rid of it.
try {
intent.url = intent.url.replaceAll('%2F%2F', '%2F'); // '//' -> '/'
if (!intent.url.includes('%3A%2F%2F') && intent.url.includes('%3A%2F')) {
intent.url = intent.url.replace('%3A%2F', '%3A%2F%2F'); // ':/' -> '://';
}
const resultUrl = decodeURIComponent(intent.url);
...
Describe the bug
If i share a file, e.g. an image, the function
createSharedFileUrlof the ShareViewController passes to many/So, i get
file:///and//filename.PNGI can remove the
+ "/" +from inside thecreateSharedFileUrlwhich helps with the//in front of the filename, but i cant figure out how to remove one of the///without manipulating the file url itself.To Reproduce
Steps to reproduce the behavior:
/Expected behavior
The shared file url should look like that:
Additional context
Currently working with
"send-intent": "^3.0.12"Inside of my Capacitor/Angular App i have added some sort of Workaround for that. Its definitely not pretty, but it works. But i also want to get rid of it.