WordPress.org

Ready to get started?Download WordPress

Forums

Download Monitor
Migrating from Download Monitor v3 (7 posts)

  1. mailnew2ster
    Member
    Posted 9 months ago #

    Hi,

    I'm using Download Monitor v3, and I've just discovered there's a new, rewritten version of it.

    I've tried to migrate using the Legacy Importer, but I've stumbled upon a couple of issues.
    The most important are:
    * The links are different now. While the old links looked like:
    example.com/downloads/file.zip
    the best I could achieve with v1 is:
    example.com/downloads/file.zip/
    which would break all old links.
    * The old version redirected to the physical location of the file with a 302 redirection. v1 uses PHP to fetch the file, which is less preferable for me because of performance, and because PHP can't support downloads as good as the hosting can (Allowing to continue downloads etc.).

    These are blocker issues for me, which prevent from me to upgrade.

    I hope the issues could be addressed in future versions.

    Thanks for the plugin,
    Paul.

    http://wordpress.org/plugins/download-monitor/

  2. mikejolley
    Member
    Plugin Author

    Posted 9 months ago #

    Did you link manually in the old version? I don't think there is a workaround I can add to the plugin for this, but I wonder if you can get around it with a custom rewrite rule in htaccess.

    Htaccess was used in the legacy version, but now endpoints are used hence the change.

    Point 2, you can enable redirect per-download (checkbox), or if your server enables it you can enable X-Sendfile which serves files reliably via apache.

  3. mailnew2ster
    Member
    Posted 9 months ago #

    > Did you link manually in the old version?
    I don't remember, but I think it was a feature. I guess adding a rule manually will work.

    > Point 2, you can enable redirect per-download
    I haven't seen the option. It's good to have, but I'd expect it to be a global setting, not per-download.
    Now I have to: 1. Enable it for all the existing downloads (no way except an SQL query, right?), and 2. Remember to tick it for every new download.

  4. mailnew2ster
    Member
    Posted 9 months ago #

    One more issue:
    The links are available using an id and using a slug, but not using a title.
    e.g. I could only get the following for File-Name.zip:
    http://example.com/downloads/1234/
    -or-
    http://example.com/downloads/file-name-zip/

    But the old link is:
    http://example.com/downloads/File-Name.zip

    The only thing I can do is creating a rule in htaccess which converts dots to dashes, and convert the text to lowercase, but then the following links would resolve as well:
    http://example.com/downloads/File.Name-zip
    http://example.com/downloads/FILE.NAME.ZIP

    The old script supported title as a script argument:
    /wp-content/plugins/download-monitor/download.php?id=File-Name.zip

  5. mikejolley
    Member
    Plugin Author

    Posted 9 months ago #

    Hmm, that may be possible. We'll need to add a new rule in here: https://github.com/mikejolley/download-monitor/blob/master/includes/class-dlm-download-handler.php#L87 and then query by title.

    But, I don't think you are talking about title? You mean actual filename?

  6. mailnew2ster
    Member
    Posted 9 months ago #

    Well, I haven't found the filename anywhere in the DB. Only title, slug, and full path in post metadata.
    The title is actually the filename by default, that's why I referred to it.
    I guess it will require saving the filename somewhere to make it work. Or e.g. replacing slug with it.

    I don't get the slug thing for downloads, anyway. Compatibility aside, it's just unintuitive. Say you want to download a file named "File-Name.zip", which of the following links would you expect to lead to the file?
    http://example.com/downloads/file-name-zip/
    -or-
    http://example.com/downloads/File-Name.zip

    So here's my suggestion:
    Get rid of the slug the way it is now, and use the column to keep the filename. Next, get rid of the trailing slash. I've just checked, and WordPress accepts such links.
    Then, links would look like links to real files instead of links to web pages.

  7. mailnew2ster
    Member
    Posted 8 months ago #

    So, what's your last word on this?
    Is there going to be an official migration option?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.