#how to add specific folder to generated exe

1 messages · Page 1 of 1 (latest)

sick nacelle
#

i have react app i want to add specific folder outside app how to acces to it directly without fetch
i mean like this .../specificfolder/img1.png

queen cloak
#

with absolute or relative path

sick nacelle
#

how

queen cloak
#

with ..

sick nacelle
#

beacause i have api to save all image in the specific folder and i want to acces to this images directly

#

but i cant configure it in electron

#

and electron not let me to specify folder to install it

queen cloak
#

what?

#

you can access it directly by path

sick nacelle
#

i want to add other folder outside app andd acces it directly from front

queen cloak
#

you can access it by absolute path

sick nacelle
#

you can explain because with absolute path i cant

queen cloak
#

Do you know what absolute path is?

midnight flint
#

You can make a folder named static outside the src folder, add any file (eg icon.ico) there and then use path.join(__static, "icon.ico") to get the path. You'll have to import path like this: import * as path from "path";

#

This is my folder structure. I use electron builder to package my app

sick nacelle
#

the problem i have a middlware save picture from cloud to specific folder like c:/images

#

and my electron app exe cant access to this folder to read all image directly

#

i hope you understand me