Giter Club home page Giter Club logo

bunny-storage-go-sdk's People

Contributors

l0wl3vel avatar renovate[bot] avatar solracsf avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

solracsf

bunny-storage-go-sdk's Issues

Implement undocumented DESCRIBE method

Hyrums law strikes again.

While looking for a way to coerce the list file endpoint to basically head a single file I found an undocumented endpoint to "head" a single file. It is called using the "DESCRIBE" instruction @bene1618 and I stumbled upon while I explained the insanity of using a trailing / to distinguish a List and Download API call using the bunny storage API. We found it by messing around with calling the HEAD method on a file and saw DESCRIBE in the Access Control Header:

HTTP/2 401 
server: nginx
date: Mon, 22 Jan 2024 17:56:09 GMT
content-type: application/json
access-control-allow-headers: AccessKey, Content-Type
access-control-allow-methods: GET, DELETE, POST, PUT, DESCRIBE
access-control-allow-origin: *

Turns out that this allows you to get the Object Metadata for single non-directory files.

curl --request DESCRIBE --url https://storage.bunnycdn.com/myzone/meta/file.txt --header 'AccessKey: secret' --header 'accept: application/json'

This is a very useful function to implement efficient heading of objects in JuiceFS, which is why I think this should be implemented in the library.

It is also used in the official Java SDK: https://github.com/search?q=repo%3ABunnyWay%2FBunnyCDN.PHP.Storage%20describe&type=code

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.