Skip to content

Saving a file should involve only one API request #16689

Open
@krassowski

Description

@krassowski

Description

Since #15577 two requests are performed when saving the file:

  • save
  • get new model (hash without content)

return this._manager.contents
.save(path, options)
.then(async contentsModel => {
const model = await this._manager.contents.get(path, {
content: false,
hash: true
});
return {
...contentsModel,
hash: model.hash,
hash_algorithm: model.hash_algorithm
} as Contents.IModel;
});

Expected behavior

Instead of the second request, the hash should be extracted from the save response. Depends on:

Context

  • JupyterLab version: 4.1.0 - 4.3.0beta0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions