No permission to read a file my app wrote to /Data dir?

When I try to play a file using my html5 <audio> tag, I get this error now:
2019-06-24 08:33:08.595 19791-19861/io.ionic.starter E/Capacitor: Unable to open asset URL: http://localhost/_capacitor_file_/DATA/EN-1.mp3

I’ve used webview convertFileSrc() to get this URL. As far as I can tell, the file is there – I didn’t see errors when copying the file there using capacitor Filesystem.

Anyone know why I cannot open that url?

Turns out I was using Capacitor Filesystem incorrectly. The correct way to import it is:

import { Plugins } from ‘@capacitor/core’
const { Filesystem } = Plugins;

If you do ‘import { Filesystem } from @capacitor/core’, it does not work for some reason.

Hope this helps someone.