Hello,
I am using both Uploader and PDFViewer in a solution. The user chooses the PDF file and uploads it to the database using the Uploader control. Up to this part, everything is fine. And I also got the "actionComplete" event working on Javascript to see the success of the upload. But from this point forward I was not able to find out how to display the uploaded PDF file in the PDFViewer after the "actionComplete" event.
I would appreciate any help in the subject.
Regards,
Alexandre
|
<button type="button" onclick="loadFromPath()">LoadDocumentFromPath</button>
<button type="button" onclick="loadFromBase()">LoadDocumentFromBase</button>
function loadFromPath() {
var viewer = document.getElementById('pdfViewer').ej2_instances[0];
viewer.load("FormFillingDocument.pdf");
}
function loadFromBase() {
var viewer = document.getElementById('pdfViewer').ej2_instances[0];
viewer.load("data:application/pdf;base64,JVBE…”, null);
}
|
Hello,
Thanks for the support! I got it working here, and now the PDF is displayed at the PDFViewer after beeing uploaded to the database. It works just fine at my development machine, but when I test it at the production server I got a "Server Error" and the PDF is not displayed.
Should I change any settings before deploying?
Regards,
Alexandre
Hello,
I just solved the issue with the help of other posts in the forum. I was just a matter of adding folder permissions for the app in the production server.
Regards,
Alexandre