Open
Description
Problem
Contents manager get()
method now supports require_hash
option and returns hash if queried with require_hash=True
:
however save()
does not support require_hash
and frontend needs to update the hash after each save leading to rather inelegant and resource-wasting frontend implementation:
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;
Proposed Solution
Support require_hash
in save()
method of the contents manager (and expose it via REST API).
Additional context
This is the case since: