dotnetnukednn9

.js file not allowed to upload in the DNN


I've been trying to upload .js file extension in DNN v09.13.04 in the {dnnwebsite}/admin/File-Management path it shows me this error.file upload

Now what I've tried is in the Settings > Site Setting side bar under Site Behaviour settings Chose custom within Choose file whitelist for end users from drop down and added js in the right Text Area which is named as Allowed File Extensions it updates as but soon as refresh the page it reverts back to default drop down and removes the js extension from it, I've tried to stop and refresh the IIS but it still don't work then I did was in the DD9\web.config path added.

<mimeMap fileExtension=".js" mimeType="application/javascript" />

web.config Still it did not work as expected to upload a .js file in the {dnnwebsite}/admin/File-Management path.


Solution

  • You'll need to allow those extension at Security, under More Security Settings. Once uploaded, remember to remove it from Security Settings immediately.