• Hi,
    Most of our docs relies on VARINSTALL files, which are plain text files, UTF-8, with no extension. Renaming thoses files would be a real pain. Is there any way I can modify the plugin to allow a rule like this :
    * = text/plain
    Which would allow text files with no extension to be uploaded? Thanks.

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

    (@kimipooh)

    This plugin is based on the assumption that the file extension exists. There is no guarantee that a file without the file extension can be managed by WordPress media, and therefore there is not any plan to implement it in the future.

    Thus, it is better to rename the files before uploading using a tool that can rename files in bulk. Alternatively, you can use FTP to upload the files directly to the server where WordPress is installed.

    Thread Starter jcochennec

    (@jcochennec)

    Ok, I agree. Is there a simple relatively “safe” way I can “hack” this behaviour to allow upload for those types of file, but only for certain names (INSTALL, README) considering they are text files?
    If it’s too complicated I will find another way?
    Thanks for your answer. Have a nice day.

    Plugin Author kimipooh

    (@kimipooh)

    Files with no extension are explicitly prevented from being uploaded by the _wp_handle_upload function (line: 856-858) in wp-admin/file.php. It looks like the only way to get around this is to edit the core WordPress file (file.php) directly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘‘*’ = text/plain for file with no extension’ is closed to new replies.