WPLMS S3 PDF not showing up

Home Forums WPLMS AddOns WPLMS S3 WPLMS S3 PDF not showing up

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #196146
    kapitalminds
    Participant
    S3 installed, activated and ajax disabled. But PDF is not loading. Please assist. Site credentials provided below. Thanks!
    #196147
    kapitalminds
    Participant
    This reply has been marked as private.
    #196532
    kapitalminds
    Participant
    Anyone please?
    #196553
    MrVibe
    Keymaster
    checking site...
    #196555
    MrVibe
    Keymaster
    The PDF object is generated and embedded but not visible, http://prntscr.com/mkfic6 debugging more..
    #196559
    MrVibe
    Keymaster
    most likely the issue is in the bucket or bucket location, can you share the bucket parameters with me ? Also, the WP Admin details are not allowing me to make changes in your site. So, I may need FTP details to fix this in your site.
    #196579
    kapitalminds
    Participant
    This reply has been marked as private.
    #196801
    Anshuman Sahu
    Keymaster
    Well we checked this .I guess the files configuration on your amazon account is prohibited to be embedded . When I access the pdf url it gets downloaded in chrome . Did you tried to implement this on your amazon server ? : https://docs.easydigitaldownloads.com/article/1172-how-do-i-force-files-to-download-in-amazon-s3  Other possibility might be the CORS issue : https://github.com/mozilla/pdf.js/issues/2938
    #196833
    kapitalminds
    Participant
    Not quite sure what you meant. I've set up the buckets as per your tutorial videos, unless there are additional settings on Amazon S3 that I need to select before creating the buckets then please advise accordingly.
    1. <span style="text-decoration: line-through;">So no solutions to displaying PDFs on WPLMS S3 plugin? Or you require more time to debug and fix?</span> Nevermind. I think I found a quick fix. In S3 console, right click on the pdf and select Properties > Metadata. Change the following: <pre style="margin-top: 0px; margin-bottom: 1em; padding: 5px; border: 0px; font-variant-numeric: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; width: auto; max-height: 600px; overflow: auto; background-color: #eff0f1; word-wrap: normal; color: #242729;"><code style="padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; background-color: #eff0f1; white-space: inherit;">Content-Type: application/pdf Content-Disposition: inline; But I cannot constantly go to Amazon S3 and edit Metadata manually for all my PDFs! So please help me find a fix for uploading files from Wordpress Add Media to Amazon S3 with the correct Metadata settings etc. I paid for this WPLMS S3 plugin but I'm doing all the works...
    2. And could you please tell me what have you done to change all my users' profile picture?? I need you to undo what you have done please! Thank you very much.
    #196840
    kapitalminds
    Participant
    Ignore the post above. So much gibberish. <<<REPOSTING. Pls answer my numbered question inline.>>> 1. I think I found a quick fix. In S3 console, right click on the pdf file and select Properties > Metadata. Change the following: Content-Type: application/pdf; Content-Disposition: inline; I cannot constantly go to Amazon S3 and edit Metadata manually for all my PDFs! So please help me find a fix for uploading files directly from Wordpress to Amazon S3 with the correct Metadata settings etc. I paid for this WPLMS S3 plugin but I'm doing all the works...
    1. WPLMS S3 anything less than 1 minute/60 seconds expiry for my PDF and my entire page won't load. I am given the option to set expiry in seconds but it won't work. Why? I would like to set the shortest time frame possible (e.g. 5 seconds) so the key expires upon PDF load.

    2. How to incorporate the '#No Toolbar' on PDF viewer into WPLMS S3 shortlink? I think this method can further prevent students from clicking Download & Print button. http://website.com/form.pdfstrong#toolbar=0&navpanes=0&scrollbar=0/strong

    3. Why is the normal </embed> PDF not extending the height to 100% on my page? And that annoying attachment list at the bottom that keeps coming back after deleting it, I hope you have found a fix for it.

    1. Could you please tell me what have you done to change all my users' profile picture?? I need you to undo what you have done please! Thank you very much.
    #196853
    kapitalminds
    Participant
    I believe the key problem is in the provision of Metadata when uploading through your plugin to Amazon S3. All my pdf files uploaded are categorised as application/octet-stream instead of the correct content type: application/pdf. That is why my pdfs are not showing up in browser. Anyway, please answer my questions above. Most importantly, I would like to implement the #toolbar=0 together with WPLMS shortcode. Hear from you soon. Thanks.
    #197126
    Anshuman Sahu
    Keymaster
    to change profile picture please goto wp-admin -> WPLMS -> buddypress ->upload default avatar . for s3 I guess the pdf's you are uploading are itself having this mime type of application/octet-stream . You can check if using any online mime type checker . This is where the issue is appearing . to add no toolbar : we would need to make changes directly in the s3 code which we wont recommend coz on update the file is replaced and changes will be lost .  
    #197196
    kapitalminds
    Participant
    The online mime checker all displayed the correct application/pdf. Anyway, no worries about this, I can manually bulk upload into Amazon S3 directly and it will auto-pick the correct Metadata. May I get you to help me implement no toolbar code customization for me please? If it's a small code insertion into the S3 plugin file(s), let me know which file(s) etc. so i can replace the code everytime the files are updated. This way I can mitigate the minimum 1 minute file expiry because setting anything less than 1 minute and the entire page won't load. Just don't want people to go sniffing the source code and download my PDFs while the 1 minute is counting down. Thanks!
    #197334
    Anshuman Sahu
    Keymaster
    Ok implemented this by editing the code of wplms s3 plugin . wp-content/plugins/wplms-s3/includes folder -> class.init.php file line : 116 http://prntscr.com/mmnqg0
    #197467
    kapitalminds
    Participant
    Thanks Alex for the code. 1 more issue: My students complained that they cannot view the PDFs on their mobile devices/iPad. I've also checked, WPLMS S3 plugin does not show PDF in mobile browser but instead have a download button. If i were to use the normal PDF embedding code, the PDF is displayed in mobile browser but unable to scroll the pages. If i were to use Google PDF Viewer, it works for both mobile browser and PC browser but will not be hooked to Amazon S3. Any solutions to allow PDF viewing in mobile phone browsers?
Viewing 15 posts - 1 through 15 (of 25 total)
  • The topic ‘WPLMS S3 PDF not showing up’ is closed to new replies.