WordPress.org

Ready to get started?Download WordPress

Forums

WP Document Revisions
[resolved] Possible to view rather than just download? (9 posts)

  1. Chisos Designs
    Member
    Posted 2 years ago #

    I am looking at using wp-document-revisions for an intranet site. Is it possible to make it where when you click on a document link it doesn't automatically try to download?

    http://wordpress.org/extend/plugins/wp-document-revisions/

  2. Chisos Designs
    Member
    Posted 2 years ago #

    More info - right now we are working with .pdf files - trying to get it so that people can view the PDF in their browser rather than have it where they download it and then have to use another program to open it.

  3. Ben Balter
    Member
    Plugin Author

    Posted 2 years ago #

    Let me look into that. It looks like it should just be a matter of passing a setting to the browser when the file is served in most cases, but obviously has a lot to do with the user's browser/settings.

    I opened up an "issue" over on github if you want to track the progress and hope to have an answer soon.

  4. Chisos Designs
    Member
    Posted 2 years ago #

    Much appreciated!!

  5. Ben Balter
    Member
    Plugin Author

    Posted 2 years ago #

    Also, I assume this is IE / Windows?

  6. Ben Balter
    Member
    Plugin Author

    Posted 2 years ago #

    So I'm going to want to test this a bit more before I look into making the change in the core plugin, but it's actually a really simple fix:

    If you're comfortable, on line 725 of the main plugin file, simply change the word "attachment" to "inline" and you should be all set.

    https://github.com/benbalter/WP-Document-Revisions/blob/master/wp-document-revisions.php#L725

  7. Ben Balter
    Member
    Plugin Author

    Posted 2 years ago #

    here's a zip of the patched version. Let me know if this works for you? (If you could test on multiple browsers, if possible, would be greatly appreciated!)

    https://github.com/benbalter/WP-Document-Revisions/zipball/inline-patch

  8. Chisos Designs
    Member
    Posted 2 years ago #

    Works like a champ in Chrome / Mac OS X 10.7.3

    Will check it out in other browsers when I get a chance.

  9. kes1066
    Member
    Posted 1 year ago #

    The isstructions read:

    If you're comfortable, on line 725 of the main plugin file, simply change the word "attachment" to "inline" and you should be all set.

    But when I go to line 725v I only fin\d this -

    if ( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )

    I don't see the word, 'attachment'.

    Have I missed something?

    This is a great plugin, but I really need the ability for viewers to see the file too. They need to see what is already present, content-wise, before they decide if an edit is necessary.

    Is this possible?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic