vscode: NotebookController asWebviewUri does not work for notebooks

Run a remote-ssh notebook that does something like this:

let remoteUri = controller.asWebviewUri(vscode.Uri.file('/datadrive/vscode-notebook-testbed/img.png'));
task.appendOutput(new vscode.NotebookCellOutput([ new vscode.NotebookCellOutputItem('text/html', `<html><img src=${remoteUri!.toString()} /></html>`) ]));

I get a uri https://0.vscode-webview-test.com/vscode-resource/file///datadrive/vscode-notebook-testbed/img.png, and it 404s

cc @mjbvz @rebornix @jrieken @DonJayamanne

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 18 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks, I’ve published the insider version of the Juypter exension to marketplace as well.