• Although I have added “json” in allowed file types in network settings, if I login as network admin, I cannot publish json files in the media library, unless if I also set “define( ‘ALLOW_UNFILTERED_UPLOADS’, true );” in wp-config.php, which I would like to avoid for security reasons.

    Also, if I login as a user with only “Administrator” role, I cannot publish json files in the media library, even if I also set “define( ‘ALLOW_UNFILTERED_UPLOADS’, true );” in wp-config.php.

    I also tried by adding the “json” mime type using the “mime_types” filter, but it does not work either.

    Please advise on how to allow upload of json files in media library for users with “administrator” role.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You could try the Lord of the Files plugin.

    Thread Starter Eric Malalel

    (@teachlynx)

    Thanks for advice, I just tried it but it does not work on my network install, where I put it as a must use plugin.

    JSON file still cannot be uploaded.

    Did you remove your changes before trying it?

    Thread Starter Eric Malalel

    (@teachlynx)

    Yes. I host on Win 2012 and IIS 8.5, maybe plugin has not been tested on this infra.

    Due to short delay, I had to adopt another solution and publish the files I need with a txt extension rather than a json extension.

    I wonder if you could follow up with the author of the Lord of the Files plugin (on that plugin support forum), because he is very helpful and always wants to find all the edge cases to fix.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘unable to upload json file to media library’ is closed to new replies.