Giter VIP home page Giter VIP logo

Comments (4)

kurin avatar kurin commented on August 20, 2024

It would be easy enough to expose an object's ID, but honestly running two lists and subtracting IDs to find hidden objects isn't great.

Another option would be to expose hidden status in attrs, but I can't remember off the top of my head if I can easily do that without excessive round trips.

from blazer.

AndreKR avatar AndreKR commented on August 20, 2024

I think it's not even possible with round trips. The information whether a version is the newest one is not in the b2_list_file_versions response and not even in the b2_get_file_info response.

So comparing with the b2_list_file_names response seems to be the way to go - if you have the need to get old versions (a requirement probably not too common). But you would need the IDs to do that.

from blazer.

renatocron avatar renatocron commented on August 20, 2024

I'm using a version of the B2 client (written in perl) and I'm moving some part of the system to go, and using this module to write the files to B2.

Currently on the perl code, for each upload I saved on the database the filename and the file ID, so on delete I could run with one request per delete. As I'm doing this for a few thousand files each day, this can make a difference, but now with the S3 API, I will migrate delete to using S3 layer, where it accept just the filename.

I prefer to keep uploading using the 'native' api because it's design is better than the S3 layer, there's was some times where the S3 layer was down but the native were up, but deletes can wait if the S3 layer is dow.

Awesome module, by the way! Thanks for making it public.

from blazer.

renatocron avatar renatocron commented on August 20, 2024

I've included the ID after uploads - #78

Using the S3 API for delete do work, however, the file is not really deleted until the next day (even with the "Keep only last version" enable), so you may end up paying between 1 and 47 hours of a file that have been removed from the point of the view of the application

from blazer.

Related Issues (20)

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.