Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-38

Backport Drive checksum validator

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 2.0.0
    • Component/s: None

      Description

      For a given blob, the server calculate a checksum (maybe MD5 or SHA-1).
      On Drive, when downloading a blob, we can check for an optional checksum (https://github.com/nuxeo/nuxeo-drive/blob/595581e4711dca0d9aa2ec735f6c2e9bd9929e9c/nuxeo-drive-client/nxdrive/client/base_automation_client.py#L814).

      We can backport that feature to the Python client to ease future integration into Drive.

      If checksums are not equal, raises a CorruptedFile exception, also backported from Drive.

      Implementation details:

      • No need to check if the desired algo is available in the haslib module, it is a task for the user to used something existant.
      • We just need a digest=None argument, we will guess the algo from that value.
      • Calculate checksums for files only.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 30 minutes
                1d 1h 30m