Giter VIP home page Giter VIP logo

Comments (3)

maetthu avatar maetthu commented on September 24, 2024

Thanks for your input, it's certainly worth considering, although I'm not quite sure if it's a good idea to do adapter-specific optimizations in such a simple plugin, since I'd like to keep it as generic as possible. But I'm open for it.

There are adapters where you can get certain checksums directly from the API (I'm using something similar to your code for Azure Blob Storage where the MD5 hash is returned as a response header), but it's not very consistent unfortunately. The ETag in S3 for example, isn't guaranteed to be an MD5 hash. Quoting from the S3 API docs:

The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted [...]

from flysystem-hash.

basz avatar basz commented on September 24, 2024

I feel you. I'm not sure it belongs in a generic plugin either.

Additionally I was not aware the ETag wasn't consistent. Oops. Good to know!

For us streaming isn't a real problem as we store the hash after it has been detected locally in persistence anyway. So a file would only be streamed once if its not known yet.

Only noticed because we have some files on record without a checksum set (which was a bug) and need to repair these file records.

thanks! Bas

from flysystem-hash.

maetthu avatar maetthu commented on September 24, 2024

I'll close this issue then. But thanks for your input, much appreciated anyway.

from flysystem-hash.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.