-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to preview resources (images, css...) outside of the workspace 401 Unauthorized #848
Comments
I think this is the same issue as #747 (upstream issue: microsoft/vscode#187697). |
Ah! I did test using a symbolic link. It did work, but this is not a very easy solution to implement on Windows PCs. It requires opening a command prompt with administrator permissions and the user must type a lot of commands. |
The only workaround I can think of would be to add a new setting to add additional local resource roots on the webview. |
Please forgive my ignorance, but how does one implement that? I tried googling, but search terms did not lead me to any promising result. |
Sorry for the confusion! Yes, that would be a new feature in the asciidoctor-vscode extension. Could you please do the same test but using the Markdown extension? This extension is/was heavily based on the Markdown extension codebase. I want to make sure that we didn't forget to include an important bit. |
as a workaround before antora is fully supported, I managed to preview images in vscode-asciidoctor web preview by doing the following setting in vscode web preview:
|
@man-chi you are a wonderful human being! That works so well! |
@challengemkr20 you are welcome. glad that I could contribute back to the open-source community. also, I have created a feature request ticket to make the "imagesdir":"../images/" by default, if the Antora setting is enabled. I hope I can contribute more. |
@man-chi Antora, Antora-Assembler (Asciidoctor-PDF) correctly follow the include:: syntax, but not VSC. It seems I can only include my diagrams in-line in VSC.
My .dot file is
I tried adding a few more attributes, but I receive "Error 400: Error: stdin>: syntax error in line 1 near 'Unresolved' (exit code 1).
|
Hello,
I am unable to preview images which are outside of the project folder.
However, I am able to preview images which exist in the same folder, or a subfolder of a project.
The closest issue I could find which had a similar bug is Images appear as broken in preview pane in AsciiDoc 3.1.8 #819, but this is slightly different.
I am using Windows.
I created two folders on the c:\ drive of my computer.
c:\a
andc:\aa
image{a/aa}.adoc
and animage{a/aa}.png
.image{a/aa}.png
from the other folder'simage{a/aa}.adoc
file.This screenshot was taken from the
c:\aa
project'simageaa.adoc
, I tried to add thec:\a\image.adoc
file.I am able to use VSCode to render PDF and HTML files which include the images. All four figures are included in the output files.
Failed Attempts:
../a
or../aa
does not work.C:/a/
.c:/a/
.I get
Failed to load resource: the server responded with status of 401 (Unauthorized)
orNot allowed to load local resource
from the Webview Developer Tools. Sorry I cannot figure out how to copy out of this window.I tried each option in the AsciiDoc: Manage Preview Security Settings, reloaded, and had the same result.
Background
antora.yml
file to point to either my local hard drive or the remote HTTPS Artifactory directory. I simply want to define both attributes and comment out one or the other as needed. Remote image::http:// urls are working with preview, but the local folder path is not, which is what led me to creating this issue.Here is the example in the above screenshot. I didn't update the title before taking the screenshot.
Windows and VS Code version
asciidoctor-vscode version
The text was updated successfully, but these errors were encountered: