Cannot upload .js file to library | Experience Community
Skip to main content
Solved

Cannot upload .js file to library

  • Dec 28, 2018 7:42 PM UTC
  • 4 replies
  • 70 views

rsuter
QPN Level 2 ●●
Forum|alt.badge.img+5
Hello there, I have been trying to upload a .js file to my Files Library but I have been receiving a "The file you have uploaded is a disallowed file type" error. I can't find any other information or reference to this error. I have experimented with various permission levels by user type and group type, but that does not seem to work. Does anyone know if file types are gated by account level? Or is not possible to upload .js files?

Best answer by fleb

Hi, I don't know how exactly this works, but I had the same problem even with a paid account. I just uploaded the same file without the suffix and was still able to use my functions which were inside.
View original

4 replies

fleb
Level 3 ●●●
Forum|alt.badge.img+6
  • Level 3 ●●●
  • Answer
  • Jan 2, 2019 7:29 PM UTC
Hi, I don't know how exactly this works, but I had the same problem even with a paid account. I just uploaded the same file without the suffix and was still able to use my functions which were inside.

rsuter
QPN Level 2 ●●
Forum|alt.badge.img+5
  • Author
  • QPN Level 2 ●●
  • Jan 2, 2019 8:07 PM UTC
Thanks, @fleb ! That did the trick.

  • Jan 2, 2019 10:32 PM UTC
Hello @rsuter , Alternate way is to first upload normal text file and then in the edit option of the uploaded text file upload the JS file

  • Jun 12, 2019 6:56 PM UTC
I'm not able to make this work. Choose new file throws a console error "Error: Mismatched File types: text/html". Edit: Just leaving the file as a .txt seems fine.