getting 404 error while accessing the file from directory

Jay Partner, Registered Posts: 2 Partner

Hi Folks!

Thanks in advance.

I am using dataiku since last 4 months for a standard webapp type project in Dataiku.

I want to render a pdf file into frontend from the local dataiku directory. I have got the path and name of file from below get_pdfs function and trying to display pdf file into html with #pdfpara id. When I run the code, I get the 404 page not found error while I have used correct path and file name.

Please let me know where I am doing wrong. Below is the code for the refference.


def get_pdfs():
import dataiku
handle = dataiku.Folder("PDF_DATA_V2")
path = handle.get_path()
list_pdfs = handle.list_paths_in_partition()//In this variable around 2K pdfs are listed.
first_pdf = list_pdf[0]
b = path + first_pdf
return b



let pdfvar = document.getElementById("pdfpara");

$(document).ready(function showPdfs(){
$.get(getWebAppBackendUrl('get_pdfs'), function(b){
pdfvar.innerHTML = `<embed src="${b}" type="application/pdf" width="100%" height="500px">`;




<div id = "pdfContainer">
<p id ="pdfpara">
this is space to show the pdf file


Operating system used: windows 10

Setup Info
      Help me…