https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • e

    Erisa | Support Engineer

    03/16/2023, 7:24 PM
    @User đź‘€ Object Lifecycles are here
  • p

    Plotzes

    03/16/2023, 7:24 PM
    YES!!
  • e

    Erisa | Support Engineer

    03/16/2023, 7:25 PM
    @denchi you were asking about this yesterday
  • d

    denchi

    03/16/2023, 7:37 PM
    Oooh heck that's awesome! Thanks for the ping.
  • d

    denchi

    03/16/2023, 7:37 PM
    Is there a way to do this directly from the dashboard?
  • e

    Erisa | Support Engineer

    03/16/2023, 7:37 PM
    Don't think so currently
  • s

    salutalice

    03/16/2023, 7:37 PM
    Is this a per bucket rule or per object rule ? Like delete objects from trash after x days
  • e

    Erisa | Support Engineer

    03/16/2023, 7:38 PM
    Policies cover object key prefixes
  • e

    Erisa | Support Engineer

    03/16/2023, 7:38 PM
    like
    assets/
    or something
  • d

    denchi

    03/16/2023, 7:39 PM
    That's perfect. Haven't used the S3 API before but I'll definitely look into that.
  • d

    denchi

    03/16/2023, 7:39 PM
    The
    .putBucketLifecycleConfiguration({
    doesn't seem to specify a bucket name. Is that intentional?
  • s

    salutalice

    03/16/2023, 7:41 PM
    So I could create a prefix trash/ and set this rule ?
  • e

    Erisa | Support Engineer

    03/16/2023, 7:41 PM
    yep
  • e

    Erisa | Support Engineer

    03/16/2023, 7:42 PM
    It should according to the AWS docs () Try adding a
    Bucket: 'name',
    before
    Rules:
  • d

    denchi

    03/16/2023, 7:43 PM
    Ooh, ok. Yeah, it's in the other examples too.
  • e

    Erisa | Support Engineer

    03/16/2023, 7:44 PM
    If you can validate it works for put, feel free to PR the docs (Theres an "Edit on GitHub" button at the bottom of the page)
  • s

    salutalice

    03/16/2023, 7:44 PM
    Does this create some daily requests or something ?
  • s

    salutalice

    03/16/2023, 7:44 PM
    To check the time ?
  • e

    Erisa | Support Engineer

    03/16/2023, 7:44 PM
    Not that I'm aware of
  • d

    denisep

    03/16/2023, 7:46 PM
    Hi there! I wanted to share an update I made to the R2 docs yesterday. You'll notice that the nav changed to have different top level item names, which should make it a little easier to find content you're looking for. As always, open to feedback to learn how we can continue to improve the docs. 🙂 And if you find anything incorrect, missing, etc., PRs to the R2 docs or issues in Github are encouraged and welcomed! https://developers.cloudflare.com/r2/
  • d

    denchi

    03/16/2023, 8:15 PM
    How accurate are the lifecycles?
  • d

    denchi

    03/16/2023, 8:16 PM
    In the docs, it says
    Objects will typically be removed from a bucket within 24 hours of the x-amz-expiration value.
  • d

    denchi

    03/16/2023, 8:16 PM
    If I want my objects to be deleted after one day and have this config:
  • d

    denchi

    03/16/2023, 8:16 PM
    Copy code
    Expiration: {
                Days: 1,
              },
  • d

    denchi

    03/16/2023, 8:17 PM
    would that mean my objects are guaranteed to stay around for one day and then be deleted automatically sometime within the next 24 hours after that?
  • d

    denchi

    03/16/2023, 8:28 PM
    And another question: If I don't supply a filter, does the rule apply to all objects in the bucket?
  • h

    Harshal

    03/16/2023, 9:00 PM
    Yep
  • h

    Harshal

    03/16/2023, 9:00 PM
    Yep exactly
  • h

    Harshal

    03/16/2023, 9:00 PM
    No, thanks for pointing that out! We'll look to get that updated
  • d

    denchi

    03/16/2023, 9:19 PM
    Perfect, thanks a lot 🙏
1...946947948...1050Latest