You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uploadGeneratetoken: Add support to optionally create new revision
Backported from PR midasplatform#146
This commit updates the "uploadGeneratetoken" API introducing the new
parameter "create_additional_revision" allowing to optionally change
the default behavior and ensure a new revision is created when:
- a bitstream associated with the file already exists on the server
- and the checksum parameter is specified
- and the item updated has at least one revision
Since the http uploader doesn't specify the "checksum" parameter, the
problem is only reproducible using the web API.
For example, considering the following configuration:
folder
|--- item1 --- revision1
| |--- bitstream1 (filename1)
|
|--- item2 --- revision1
| |--- bitstream2 (filename2)
By default, trying to associate bitstream1 with item2 will result in
this configuration:
folder
|--- item1 --- revision1
| |--- bitstream1 (filename1)
|
|--- item2 --- revision1
| |--- bitstream2 (filename2)
| |--- bitstream1 (filename1)
By setting the option "create_additional_revision" to True, the
following configuration will be obtained:
folder
|--- item1 --- revision1
| |--- bitstream1 (filename1)
|
|--- item2 -|--- revision1
| | |--- bitstream2 (filename2)
| |
| |--- revision2
| | |--- bitstream1 (filename1)
0 commit comments