-
Notifications
You must be signed in to change notification settings - Fork 3
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
How to read image from local? #6
Comments
where are the images located? Can you show the snipped code you used for this? |
Reading a file from Blazor WASM is not possible from disk read, you will need to expose the images under |
I guess that answers my question. Will it be a good idea to have some way of identifying if the string set was a file path and then convert to dataURL internally? |
I don't think it's a good idea mixing this. Images should be considered as base64 string always as pdfmake specs this. How we would manage relative and absolute What about if the resource/image we are trying to lookup is under authorization? We would still need to set an I think the idea is great and we should implement this options under an extension or helper methods. If we are ok with this approach we should create a new issue with the proposed methods to implement. What you think? How does this sounds? |
For the demo purpose you can place an image under |
This sounds good. |
I am trying to use the file paths for the image (I am using the server extension). I am getting the following error.
I have tried using the absolute path as well but no luck there.
The text was updated successfully, but these errors were encountered: