SaaS CMS has officially launched! Learn more now.

"First time" file upload failing


Experiencing a bug when uploading a file for the first time on an EpiServer page.

Using the "+"-button as the image shows:

I get the following result with the "Content type "DocumentFile" is not allowed..."-message when hovering on "Mislyktes" (Norwegian for "Failed"):

The "DocumentFile" is defined as follows:

Getting this console message if helpful:

If I, however, use drag and drop to add the first file - it works. And when I then add a new file with the "+"-button after a file is uploaded with drag and drop, this will now also work.

So, the issue only occurs when uploading a file with the "+"-button the first time.

Is this a known issue? Or does anyone have an idea what causes this behavior?

Running EpiServer 11.12

Aug 28, 2019 13:57

Hi jonasloc,

The error message in the above screenshot pointing you to exact issue. Actually, when you pressed the + button first time it will try to create the media file under the "StartPage" and media items are not allowed under the "StartPage" so that's why it is giving the failed error.

So it might be possible that for the first time Episerver not able to identify the parent folder to upload the media item or you have selected the "StartPage" to upload the media item.

Also attaching the ss with highlighting the message

I hope it helps.



Edited, Aug 28, 2019 14:44

The issue also applies to all sub-pages of "StartPage" as long as no previous successful file upload has occured on that page.

Which is the case here:

I also mention in the original post that the drag and drop functionality works regardless if it is the first time or not. Do you know why there is a difference between using the + and drag-and-drop?

Aug 28, 2019 16:31

I think this was a bug for one specific Episerver version that was fixed rather quickly.
What version are you running? Is upgrading an option?

Aug 28, 2019 20:45

Running Episerver CMS 11.12.0.

EPiServer.UI is at 11.21.2. 

Upgrading is an option yes - but cannot find any fix for this in recent release notes.

Aug 29, 2019 10:27

What if you create a new folder first? Does the upload work then?

That was our workaround for the bug I have in mind. I can't find it in the release notes either.

Aug 29, 2019 10:31
jonasloc - Aug 29, 2019 12:28
Creating a folder first worked! But since our editors are unaware of the issue they will still try the "+"-button first. So then we might as well tell them to use drag-and-drop instead of the new folder "hack".

Do you have any idea why the drag-and-drop works and not the + when uploading for the first time?

I tried the same scenario with Episerver.UI "" and not able to replicate this issue so I think you can give a try with upgrading the Episerver version.

Edited, Aug 29, 2019 10:42
jonasloc - Aug 29, 2019 12:32
Since we are running the same EPiserver version do you suggest upgrading EPiServer.UI to latest or downgrade to your version?
Ravindra S. Rathore - Aug 29, 2019 12:36
I think you should upgrade the UI to the latest version
jonasloc - Aug 29, 2019 15:41
The issue still persists with the latest versions.

Sorry for the long post, but I checked the devtools network tab to see what was going on with both the "+"-button and drag-and-drop, and found some interesting results.


Call stack:                                                                                                             

Response of Upload/:

contentLink = null which lead to contenLink = -1 in the URL Request in the header of "-1?dojo.prevent...":

And returns:



Call stack:                                                                                                     


Response of Upload/:

contentLink = 778_866 which leads to contenLink = 547 in the URL Request in the header of "547?dojo.prevent...":

And has an "assetsFolderLink" in the response:

Which we in the call stack see is called later in "777?dojo.prevent..." and is the contentFolder.


Clearly the contentLink is the issue here. Doesn't really help fixing the issue, but shares som light on what's going on.

Edited, Aug 29, 2019 15:36

Thanks for doing this research, Jonasloc. Can you please submit this bug to

Aug 29, 2019 18:59
jonasloc - Aug 30, 2019 12:47

We are also experiencing the same error. I've upgraded to the latest EPi nugets but still the problem persists. 

For now only drag and drop works. 

Aug 30, 2019 10:27

Same problem here..

Sep 03, 2019 10:40

The bug has returned - and is fixed (again) in EPiServer.CMS.UI 11.21.7, bug CMS-14589.

Sep 30, 2019 21:15
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.