Replies: 1 comment
-
|
I’ve seen this too, it’s not a configuration error on your side. It seems to be a security sandbox limitation where the preview server only looks within the current directory, so it can't reach files outside of it. Hopefully, the maintainers can look into supporting workspace-root serving in the future, as it would make managing projects with shared assets a lot easier. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Acode-Project/
├── Assets/
│ └── Image/
│ └── photo.jpg
└── Project/
└── Kartu/
└── index.html
Result: Image does not load in Acode's in-app preview.
Absolute path from workspace root:
Result: Also does not load.
Opened the root folder (
Acode-Project) as the workspace in Acode, not just theKartusubfolder — still no luck.Control test: Placed an image directly inside the same folder as
index.html(e.g.Kartu/test.jpg) and used:Result: This works fine. So the image file itself is not corrupted, and the HTML/img tag syntax is correct.
Workaround that works: Running a local server via Termux and opening the site through that server — images load correctly. But this requires manually starting a server every time, which isn't practical for my workflow.
Conclusion so far
It seems like Acode's in-app live preview can only serve files that are inside (or at the same level as) the folder containing
index.html, and cannot reach files outside that folder — even when a higher-level root folder is opened as the workspace.Question
Any guidance would be appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions