As a part of my idea of Yandex Disk as ActiveStorage service implementation, I decided to implement PROPPATCH method into yandex disk gem.
As described in webdav documentation - all what we need - make a special PROPPATCH request with PATH of our folder or file.
I’ve added simple feature here: publication branch with this functionality support.
Or you can use main repo, feature already merged to master branch.
Let’s take a look into WebDav request implementation as described above:
Let’s take a look into my Yandex::Disk::Client::Request::Publication implementation:
One important thing here - we specify new :proppatch method for the Faraday request, and need to extend it like this:
Let’s create sample example, and make our file public:
Great, now file marked as public, and we can access it via provided URL.