• Resolved Tony Law

    (@lbtdev)


    I have a series of PDF documents within Memphis that I’d like displayed in the browser as opposed to being downloaded. Currently I call a URL such as: https://www.wastepack.co.uk/?mdocs-file=1964 and a new tab is opened and the PDF is served and tab closed, downloading the file.

    I have checked my browsers settings and it is set to open in browser rather than download so I’d imagine that the functionality within Memphis is to serve the document as an attachment rather than inline. – Please can you let me know where to change this in the code?

    Also, may be worth suggesting for a future update, to offer the option when uploading a document.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bhaldie

    (@bhaldie)

    if you want to edit the php file mdocs-downloads.php around line 62 change this:

    
    else header('Content-Disposition: attachment; filename="'.$filename.'"');
    

    to this:

    
    else header('Content-Disposition: inline; filename="'.$filename.'"');
    

    I will add this to the feature request list.

    Thread Starter Tony Law

    (@lbtdev)

    Perfect, thank you

    Confirming that this works and it fixed my issue as well. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Open PDFs in browser instead of downloading’ is closed to new replies.