File opens as text file in browser when opened with PWA

32 Views Asked by At

I built a PWA from svelte-kit app. I want to open a particular type of file with my PWA. I created my PWA and defined file-handler in manifest.json. The app works as desired if I launch it using the icon on the desktop. However, when I launch the app while opening the file, instead of opening it using my PWA, it opens as a plain txt file in browser. What am I missing here? Here are the contents of my manifest and service worker: Maifest.json Service Worker

I have the code to process the file in +page.svelte code in +page.svetle

My expected behaviour is to call handleFileOnLaunch when the app is launched using "open with" when opening a file.

0

There are 0 best solutions below