Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-12480

let storage returns encoded binaries with different size from sources

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7.3
    • Component/s: Core VCS

      Description

      Binaries manager may encode content using an algorithm that change the size. We should provide the original length to the SQL blob instead of return the binary length.

      To achieve this, implementer should contribute a new Binary implementation that should implement the computeLength method

       /**
       +     * Compute length on demand, default implementation only works if
       +     * the file referenced contains the binary original content. If you're contributing
       +     * a binary type, you should adapt this in case you're encoding the content.
       +     *
       +     * This method is only used when users make a direct access to the binary.
       +     * Persisted blobs don't use that API.
       +     *
       +     * @since 5.7.3
       +     */
       +    protected long computeLength() {
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: