Display Html from dbfs files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 02:54 AM
Hi,
I want to display some content from dbfs inside my notebook. Let's say I have a image under: /dbfs/mnt/test-bucket/test-custom/sample.png
I want to embed that into my Notebook Html Output like this:
displayHTML("""<img src ='/dbfs/mnt/test-bucket/test-custom/sample.png'>""")But the image does not show up. In the browser console, I see a Error 401 with access denied?
Any help is appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2023 11:40 PM
@Sebastian Schueler :
The error you are seeing is likely due to a permissions issue. By default, files in DBFS are private and can only be accessed by the user who uploaded them. To display an image in the notebook, you will need to make sure that the file is accessible to the user who is running the notebook.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2023 06:37 PM
Hi @Sebastian Schueler
Hope everything is going great.
Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 12:40 AM
Hi @Vidula Khanna ,
unfortunately not. I can access the file through the notebook via e.g.
!ls /dbfs/mnt/test-bucket/test-custom/ but it cannot be displayed via the displayHTML, with the 401.