Describe the bug
Trying to read a local file with fetch, but the request fails due to CORS error.
import { convertFileSrc } from "@tauri-apps/api/tauri";
...
const conv = convertFileSrc("DICOM_FILES/serie_0/IM0");
console.log(conv);
const test = await fetch(conv);
console.log(test);
To Reproduce
Steps to reproduce the behavior:
yarn create tauri-app
- Create folder with static files inside
src-tauri where the app is running
- Try to read the file
Expected behavior
Able to fetch to local file
Screenshots

Platform and Versions (required):
yarn tauri info
yarn run v1.22.10
warning package.json: No license field
warning ../package.json: No license field
$ tauri info
app:spawn Running "/Users/antonio/tauri-app/node_modules/@tauri-apps/cli/bin/tauri-cli tauri info" +0ms
Operating System - Mac OS, version 12.0.1 X64
Node.js environment
Node.js - 12.20.0
@tauri-apps/cli - 1.0.0-beta.10
@tauri-apps/api - 1.0.0-beta.8
Global packages
npm - 6.14.8
yarn - 1.22.10
Rust environment
rustc - 1.53.0
cargo - 1.53.0
App directory structure
/dist
/node_modules
/src-tauri
/src
App
tauri.rs - 1.0.0-beta.8
build-type - bundle
CSP - default-src asset: blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
distDir - ../dist
devPath - http://localhost:3000
framework - React
✨ Done in 5.47s.
Describe the bug
Trying to read a local file with fetch, but the request fails due to CORS error.
To Reproduce
Steps to reproduce the behavior:
yarn create tauri-appsrc-tauriwhere the app is runningExpected behavior
Able to fetch to local file
Screenshots
Platform and Versions (required):