Notebooks: Ability to download file in notebooks. (#194)
Today, if we have non notebook file in the container and we try to download the file, it fails. That is because, the filetype is always defined as notebook in the call to content provider's get method. Fixing it to use the right type in this change.
This commit is contained in:
parent
ed9b443bf6
commit
a2845a0102
|
@ -195,8 +195,9 @@ export class NotebookContentClient {
|
|||
}
|
||||
|
||||
public readFileContent(filePath: string): Promise<string> {
|
||||
const fileType = NotebookUtil.isNotebookFile(filePath) ? "notebook" : "file";
|
||||
return this.contentProvider
|
||||
.get(this.getServerConfig(), filePath, { type: "notebook", format: "text", content: 1 })
|
||||
.get(this.getServerConfig(), filePath, { type: fileType, format: "text", content: 1 })
|
||||
.toPromise()
|
||||
.then(xhr => {
|
||||
const content = (xhr.response as any).content;
|
||||
|
|
Loading…
Reference in New Issue