Home › Forums › WPLMS AddOns › WPLMS S3 › WPLMS S3 PDF not showing up
- This topic has 24 replies, 3 voices, and was last updated 5 years, 9 months ago by kapitalminds.
-
AuthorPosts
-
February 10, 2019 at 5:21 am #196146kapitalmindsParticipantS3 installed, activated and ajax disabled. But PDF is not loading. Please assist. Site credentials provided below. Thanks!February 10, 2019 at 5:33 am #196147kapitalmindsParticipantThis reply has been marked as private.February 13, 2019 at 7:23 am #196532kapitalmindsParticipantAnyone please?February 13, 2019 at 8:28 am #196553MrVibeKeymasterchecking site...February 13, 2019 at 8:35 am #196555MrVibeKeymasterThe PDF object is generated and embedded but not visible, http://prntscr.com/mkfic6 debugging more..February 13, 2019 at 9:26 am #196559MrVibeKeymastermost 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.February 13, 2019 at 10:26 am #196579kapitalmindsParticipantThis reply has been marked as private.February 14, 2019 at 2:12 pm #196801Anshuman SahuKeymasterWell 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/2938February 14, 2019 at 8:19 pm #196833kapitalmindsParticipantNot 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.
- <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...
- 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.
February 14, 2019 at 8:59 pm #196840kapitalmindsParticipantIgnore 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...- 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.
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
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.
- 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.
February 15, 2019 at 5:38 am #196853kapitalmindsParticipantI 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.February 16, 2019 at 9:02 am #197126Anshuman SahuKeymasterto 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 .February 17, 2019 at 3:52 am #197196kapitalmindsParticipantThe 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!February 18, 2019 at 12:26 pm #197334Anshuman SahuKeymasterOk 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/mmnqg0February 19, 2019 at 10:03 am #197467kapitalmindsParticipantThanks 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? -
AuthorPosts
- The topic ‘WPLMS S3 PDF not showing up’ is closed to new replies.