How to get a pdf file on amazon s3 to be viewed and downloaded?

Forums General How to get a pdf file on amazon s3 to be viewed and downloaded?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #479
    Joshua Shapiro
    Participant

    Cristian – thanks for finding me on the other s2member forum and
    answering and suggesting I come here

    s2member pro is a powerful plugin to make a membership service
    but it takes time to learn how it does it thanks to the brilliant work
    of Jason and his support team

    however no one so far either at support or another consultant I am speaking
    to has a solution to the following challenge

    1) how can I display the member pdf file in a pdf viewer that works within the structure of
    my wordpress site – when the pdf file is in a bucket on amazon s3 – PDF viewer gives
    the error message “Invalid URL” –

    2) how can I get a message to our member who wishes to download this file (pdf on
    amazon s3) rather than the built in plugin in the browser taking over the screen and
    then just displaying the pdf file

    this means that via the link to the pdf file on amazon s3, via the codes given via s2member pro
    the pdf file can be accessed – but I have no way so far to achieve 1) or 2) does anyone have
    any ideas – what is working for you?

    will I have the same problem with an mp3 file that the browsers will assume when clicked
    the member wants to play on-line and not download

    I have tried support to get an answer but I imagine we are in the holiday season and
    everyone get busy with christmas and special days

    thank you Cristian for doing this forum

    Joshua

    #480
    Joshua Shapiro
    Participant

    Cristian – I tried to send you a message via the contact function of the forum and it didn’t let me do so
    is there any way I can talk with via email or skype (my email is crystalskullexplorers@gmail.com)
    thank you – Joshua

    #481

    how can I get a message to our member who wishes to download this file (pdf on
    amazon s3) rather than the built in plugin in the browser taking over the screen and
    then just displaying the pdf file

    The PDF or MP3 will be opened in the browser, depending on how the browser is configured, I guess. Some will open it and others will download it to the computer.

    how can I display the member pdf file in a pdf viewer that works within the structure of
    my wordpress site – when the pdf file is in a bucket on amazon s3

    You may need to generate a URL with a key. See: WP Admin -> s2Member -> Download -> Advanced

    tried to send you a message via the contact function of the forum and it didn’t let me do so
    is there any way I can talk with via email or skype

    Sorry, I hardly use skype or email lately, but I’ll be checking this forum almost daily. Thanks for the heads up about the contact form, I’ll look into that.

    thank you Cristian for doing this forum

    🙂

    #482
    Joshua Shapiro
    Participant

    Cristian

    in regard to your answer:

    You said:

    The PDF or MP3 will be opened in the browser, depending on how the browser is configured, I guess. Some will open it and others will download it to the computer.

    I say – so does this mean that no matter what shortcodes I use in s2member they can not over-ride the behavior of the browser, I tested this in chrome, firefox, opera and ms browser – everyone had a plugin open the pdf file – even if I show the s2mempro settings or shortcode to not to do inline – it still will ignore this and open the pdf file or play the mp3 file – I need to make sure that no matter what browser a person uses that I can have the same result – to download (which I have never achieved with a pdf on amazon s3 not matter what I try) or to open the pdf file in a viewer from within a word press site?

    you said:
    You may need to generate a URL with a key. See: WP Admin -> s2Member -> Download -> Advanced

    I have used the advanced features given and still unable to have through the browser I use working within
    the page framework of my wordpress website to have the pdf file displayed in either the plugin PDF viewer
    or have a way via indicating the pdf file is inline to display the pdf file to display outside of the built in pdf plugin
    within the browser – it seems all the browser if they see a pdf file will take over the full screen and display the pdf
    file within the browser’s plugin and not a word press pdf viewer plugin

    for these two situation do I have no other options? or must I then forget about using amazon s3 and put all
    the member files under the s2-files sub directory – if I do this I know the plugin PDF viewer works but then I lose
    the advantage of placing the member files with a faster system with amazon s3

    thank you Cristian

    Joshua

    #483

    I never had to sort that out before, so I needed to research it a little to answer.

    Here’s what I found at another forum: http://www.tipsandtricks-hq.com/forum/topic/force-a-file-to-download-instead-of-showing-up-in-the-browser

    1) In the S3 console, select an object, and then click the ‘properties’ button (if the properties window at the bottom isn’t already visible).
    2) Click the ‘add more metadata’ button, and add: Key: Content-Disposition Value: attachment

    To add the metadata to all the files of a bucket or just a folder in a couple of clicks with CloudBerry Explorer.

    1) right click your folder (or bucket) and select “Set Http Headers”
    2) In the new window, click “Add”
    3) For Http Headers, choose: “content disposition” and for Value: attachment; filename=
    4) Click “OK”
    5) At the bottom, select: Keep existing headers, overwrite values for headers with the same name and add new headers (from the list specified above)

    Let me know if that helps. 🙂

    #485
    Joshua Shapiro
    Participant

    Cristian you are an angle from God and I appreciate your help

    you are the second person who has told me about set http headers – but when I right click on our bucket
    this option does not appear – I have looked everywhere on amazon s3 and I can not find this option – could it be working with the firefox browser I don’t see it and should try chrome

    on the first part I was able to add content dispostion – value attachment
    now I don’t know if I needed to delete the other meta data I setup before
    which was content-type text-plain (as I read someone else to suggest to force it to download)

    in any case, it is possible unless I can find how to set http headers – that even
    making the change to add content disposition – when I click on the link to our pdf
    file on amazon s3 – using the code via s2member pro – we still see the pdf file
    being displayed in the browser …

    so so far we still are at an impass
    plus I am assuming if and when we can get this working, this means we
    will have to live with just letting our members download the files and not be
    able to all view (the pdf files) or hear (the mp3 files)

    any more ideas or suggestions —

    any ideas if there is a way to get the plugin PDF Viewer to work with our pdf file on amazon s3
    (the dvelopers said it won’t work)

    thank you again Cristian

    Joshua

    #486

    now I don’t know if I needed to delete the other meta data I setup before

    I don’t think it was needed. I just did a test leaving the others as they were, and the link now downloads the file instead of opening it.

    when I click on the link to our pdf file on amazon s3 – using the code via s2member pro – we still see the pdf file being displayed in the browser

    Hmm…

    Did you verify that PDF is not in your Inline Files setting? WP Admin -> s2Member -> Download -> Inline File Extensions

    Also, can I see the shortcode for your file link?

    I am assuming if and when we can get this working, this means we will have to live with just letting our members download the files and not be able to all view (the pdf files) or hear (the mp3 files)

    I thought that’s what you wanted, that the files always get downloaded instead of opened. If I misunderstood, could you please correct and explain in detail the behavior you want? Thanks!

    any ideas if there is a way to get the plugin PDF Viewer to work with our pdf file on amazon s3

    I don’t know… This one? https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm?hl=en

    #489
    Joshua Shapiro
    Participant

    Hi Cristian

    my ultimate goal is to offer a way for our member to view and download our pdf member files
    and to hear or download the mp3 files

    I haven’t tested the mp3 files yet because I have yet to resolve the issue with the pdf file
    always being viewed by the interal pdf viewer plugin of the browser

    yes I did ask in the download options that a pdf extension be an inline file

    here is the code on the page I am using:

    click here

    maybe there is something else I need to add here because this pdf file is on amazon s3
    what did you do to get your file to offer a download option

    thank you Cristian

    Joshua

    PS – if I have to live with just offer the pdf files as a download its ok
    or maybe I can explain to our member is they wish to view the pdf, another plugin
    takes over and the screen

    PSS – I don’t know if you have time Cristian but would it help if I let you
    be a user on our site and you looked around? I have tried setting up everything
    I read in the instructions for s2member pro

    #493
    Joshua Shapiro
    Participant

    Cristian

    I just played with a pdf file within options within my browser, and using Foxfire I saw there is an application
    you can specify to work with file types – for pdf it was setup to display the file – so no settings I use within s2member pro
    have any effect it appears

    when I changed the application to download, it downloaded the file to my computer and when I set it to ask
    it had a window that asked whether I wanted to view the pdf or download it

    so how can we prepare for the situation of our member how they will perceive the pdf file – I am sure (although I have
    tested this yet) I will run into the same situation with an mp3 file if it will automatically be played which since our mp3 files
    could be an hour it would probably be better to let them be downloaded

    do you have any suggestions how we can offer these two member files so the member is not confused what
    is going on since how they setup their browser takes presidence (I believe) over what we use in s2memberpro linked
    to downloading or viewing/playing

    Joshua

    #498

    Sorry for the wait, I’ve been travelling and with little internet the past days.

    I think I understand better what you want: make it possible to download or view in the browser, not just one, right?

    You could have a couple of links, one to view and the other to download. You could set the default to download, and then have the view link set to inline.

    Try removing the pdf and mp3 extensions from here: WP Admin -> s2Member -> Download -> Inline

    Then use a s2File shortcode for the file to give the download link.

    Below it duplicate the shortcode, but add the download attribute set to yes. WP Admin -> s2Member -> Download -> Shortcode Attributes -> download

    Let me know how it goes. I hope that helps. 🙂

    #501
    Joshua Shapiro
    Participant

    Hi Cristian

    this is what I found out so far – for example I use Foxfire – I saw there are applications for what to do with a pdf file
    and what to do with an mp3 file (basically 3 options view/play, download or ask which one?)

    so it doesn’t seem to matter what I do in s2member pro – if I try to download or view the pdf
    the settings in the browser are over riding it – so it was suggested to me by a friend who is a developer
    to offer 3 things

    a) let the person click on the link directly and as it happened with me, my application was set to view
    the pdf they would see this but then when I changed my setting to download, the file was downloaded automatically

    b) suggest (but I think on a mac if a person click directly on their link since they don’t have two buttons on their mouse
    they are asked what to do) to Window users to right-click the mouse to download

    c) make a zip file of all the member files for the month – which would be downloaded

    does this sound like a good plan since there is no way to know what setting each member will have for pdf and mp3
    files in their browser?

    the key is that via the settings I gave for amazon s3 within s2member pro is working

    but again this is the code I used (I didn’t add the in-line part – maybe if I do this would force
    the pdf to be downloaded, can you tell me Cristian as I wanted to offer for each member file two links?

    click here

    you see above I don’t have the setting about in-line – but I again believe the behavior within the browser
    will be based on the application or plugin controling how to handle pdf files

    also another developer suggested when the pdf file is viewed to open in a separate window
    so they don’t lose the link to the member page where the files are to be downloaded

    I just got a test site where I can try options and also the RC version of s2member

    don’t worry Cristian about the delay to answer, everything happens in its right time

    Joshua

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.