0

I developed a web app that will be executed offline, from the SO file system. The client wants to add a file on the folder (along index.html) to be read by the web app. Is that possible?

I know that is possible to read files with javascript, but after the build process I don't know how to locate the file.

2
  • literary create "files" folder after build in root, and during build reference it. /files/files... Or even not 100% sure if you crate manualy files folder in root of build will it be created after build in it. Also why not just make upload function? Did you even try anything? Commented Jun 10, 2021 at 13:00
  • I didn't thought about upload. Thank you Commented Jun 10, 2021 at 13:57

1 Answer 1

1

Depends on how you use Vue. For example, if you are doing a Vue CLI SPA project, then any file that's in the public folder beside the index.html can be referenced as if it was in the root folder of the URL you use (e.g. npm run serve -> http://localhost:8080 is the root; http://localhost:8080/additionalfile.xyz is accessible. It's another question what you can do with it, but it's accessible.)

More on the Vue CLI folder structure here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.