Fixing Pop-up File Uploads in 3.16


Published on May 1, 2005 at 5:26 PM EST
In the Tutorials category.

In Movable Type 3.16, using the Upload File feature to create a pop-up doesn’t work quite right. If specifying a directory to upload to (such as a dynamic upload directory), the “/” character get converted to its HTML entity—”%2f.” Obviously, that renders the file path invalid, and your pop-up doesn’t work.

Reverting to an earlier-version subroutine seems to fix it. Just replace the subroutine _process_post_upload (starting at around line 1900 in lib/MT/App/CMS.pm. (The MT license prohibits me from recreating the code here, though copying and pasting it yourself is easy enough.)