Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use media availability instead of querying the filesystem #6428
This change allows us to query the database instead of the file system or remote storage to get whether a version has a download of a specific type.
Currently, we rely on the presence of a file existing at a certain filesystem or storage path to determine whether media/downloads are available. As we move toward storage being an abstraction on top of the filesystem where it is possibly remote (eg. Cloud storage) we don't want to have to query remote storage to know whether a version has a PDF.
Instead, we started caching whether a version has builds of a specific type (eg. a PDF, ePub) and storing it on the
This builds on work in #6278
There's some additional work I didn't add into this PR to keep it minimal. However, we could add this cleanup if desired:
humitos left a comment