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

Getting images data using API request with local_secure and OIDC #5519

Open
2 tasks done
renanredel opened this issue Mar 5, 2025 · 2 comments
Open
2 tasks done

Getting images data using API request with local_secure and OIDC #5519

renanredel opened this issue Mar 5, 2025 · 2 comments

Comments

@renanredel
Copy link

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hello,

I trying to consume the data from my bookstack using API requests. I already able to get the image URL, but I'm still struggling to get the image data.
My environment is using the local_secure option to store the images, and has the OIDC with Azure enabled.
This is even possible? Thanks!

Exact BookStack Version

25.02

Log Content

No response

Hosting Environment

Kubernetes environement with linuxserver/bookstack as docker image;
OIDC with Azure (Entra ID);
File upload setup with local_secure option enabled.

@ssddanbrown
Copy link
Member

Hi @renanredel,

I think you have found a hole in our API, I don't think you can access the image data directly right now (without complex parsing of export formats) with a secure image option active. The auth applied to image fetches does not use api auth.

To help with the implementation and options, What is the wider goal? Are you trying to re-create whole pages, with images, externally? Or just need the image data itself.
Also, within your current logic, what do you have to hand? The image ID, or the original image URL?

@renanredel
Copy link
Author

renanredel commented Mar 6, 2025

hi @ssddanbrown,

I'm trying to build a chatbot, that's have the knowledge from the bookstack. So, I need to retrieve all the content from the pages and use images for the context as well.
My logic uses the image URL after getting the page content (using the export by markdown). But I can change it if needed (I'm not in production yet).
By now, I can switch back to "local" in the file upload settings, I think the migrating way is just to copy back the content to the public folder, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants