Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API endpoint, or add data to an existing endpoint, for file path from root #275

Closed
KairuByte opened this issue Apr 5, 2024 · 1 comment
Labels
🔧 feature New feature or request 🎛️ server There are things to do on the server

Comments

@KairuByte
Copy link

Is your feature request related to a problem? Please describe.
I'm implementing caching on cloudflare utilizing workers and hosting the data on backblaze. So far it works flawlessly, completely removing any need for local bandwidth, and serving files from local CDN's which vastly speeds up downloads. There is one issue though: While I can get the required information for any file in root (The download endpoint provides the file name in the Content-Disposition header) there is no way to know when a file is within a folder. This results in [root-game-folder]\That One Game.7z working as it grabs from https://files.domain.com/files/bucket/That One Game.7z, but [root-game-folder]\That One Trilogy\That Second Game.7z failing because it is trying to grab the file from https://files.domain.com/files/bucket/That Second Game.7z when it needs to grab from https://files.domain.com/files/bucket/That One Trilogy/That One Game.7z.

Describe the solution you'd like
An API call being able to return the relative path of the game, from the root GV games folder.

Describe alternatives you've considered
Storing everything in root, which is a short term valid option and one I will be following. However folder structure is likely going to become important when manifests are added, and folder organization is important for some.

Additional context
Backblaze doesn't actually use folders, it uses files with slashes in the name. But for all intents and purposes they can be treated as "in a folder(s)".

@KairuByte KairuByte added 🎛️ server There are things to do on the server 🔧 feature New feature or request labels Apr 5, 2024
@KairuByte
Copy link
Author

Actually, I'm dumb and didn't realize that ~/api/games/[id] already returns { "file_path" } which completely negates this need as I can parse out what is needed from there. Closing as "I am a dumb".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 feature New feature or request 🎛️ server There are things to do on the server
Projects
Archived in project
Development

No branches or pull requests

1 participant