Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

uploadGeneratetoken: Add support to optionally create new revision #146

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Oct 27, 2015

  1. uploadGeneratetoken: Add support to optionally create new revision

    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)
    jcfr committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    a0cae4a View commit details
    Browse the repository at this point in the history
  2. uploadGeneratetoken: Smarter "create_additional_revision" support

    This commit improves the support for "create_additional_revision"
    introduced in a previous commit. It will not create an additional
    revision if last revision has one bitstream and checkum matches
    jcfr committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    25fbe4b View commit details
    Browse the repository at this point in the history
  3. uploadGeneratetoken:: Fix style

    jcfr committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    4139b77 View commit details
    Browse the repository at this point in the history