Skip to content
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

Saving a file should involve only one API request #16689

Open
krassowski opened this issue Aug 18, 2024 · 0 comments · May be fixed by #16702
Open

Saving a file should involve only one API request #16689

krassowski opened this issue Aug 18, 2024 · 0 comments · May be fixed by #16702

Comments

@krassowski
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants