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

    (@daveshine)

    @dariusz Zielonka:
    Thanks for the feedback!

    This behavior is in regards of the mime type of the file. Currently I can do nothing about that and also have no idea how such things are made. Maybe you could ask the question in support forum of the original base plugin “WP Document Revisions”.

    In general you should research for this principle:
    For a special mime type (of a file type, that file type you want), you need a setup which forces download (instead of display) for this post type (‘document) only and if base plugin and/or mine is active.

    Maybe this hint could help you further.

    Thanks, Dave πŸ™‚

    Thread Starter Dariusz Zielonka

    (@webnatural)

    Thanks for your hint πŸ™‚
    I managed to override it and will send an example when I will be at my PC.
    Best,
    Dariusz πŸ™‚

    Thread Starter Dariusz Zielonka

    (@webnatural)

    Hey πŸ™‚

    The code I changed is located in WP Document Revisions plugin folder in wp-document-revisions.php file.
    Line 751:

    $disposition = ( apply_filters( 'document_content_disposition_inline', true ) ) ? 'inline' : 'attachment';

    changed to

    $disposition = ( apply_filters( 'document_content_disposition_inline', false ) ) ? 'inline' : 'attachment';

    Problem is that Chrome doesn’t respond to this Content Disposition. That is very unfortunate. But it can be fixed by adding HTML 5 download=”” attribute.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Force Download’ is closed to new replies.