electron-react-boilerplate / electron-react-boilerplate/electron-react-boilerplate

How can I upload a local file using fetch ?

Closed
#3,421 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
24.3k
Forks
4k
Avg merge
20m
Merged PRs (30d)
4

Description

## Summary

I want to upload a local file
`const response = await fetch(`${dir}/env.json`);. `
In version electron 11, this worked.
Now I am getting this output in the console

` [webpack-dev-middleware] wait until bundle finished: /index.html
Rewriting GET /Users/denis/env.json to /index.html
[18016:0213/133706.916013:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160)
[18016:0213/133706.916042:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)
`
What setting do I need to change to make this work?
Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.