episerver / episerver-labs-content-manager-docs

Documentation for EPiServer.Labs.ContentManager
1 stars 0 forks source link

When configured for media, "Upload Image" button doesn't upload anything #10

Closed deanebarker closed 4 years ago

deanebarker commented 4 years ago

Installed Content Manager 0.2.1 on default Alloy site. I configured a view like this:

public MediaView(UIDescriptorRegistry uiDescriptorRegistry) : base(uiDescriptorRegistry)
{
    Id = "Media";
    ViewTitle = "Media";
    Root = new ContentReference(3);
    AllowedTypesToAdd = new[] { typeof(ImageFile) };
}

This is the only code change on a default Alloy and Content Manager install. Content ID 3 is the "For All Sites" media folder.

The "Upload Image" will allow me to pick an image, but then the image selection box closes and nothing happens. When it closes, the card icons seem to flash briefly, which makes me think that interface reloaded.

Just in case it was a random error, I was able to duplicate this behavior in a second install of Alloy and Content Manager.

Watching the network tab, when I select an image and the image selection dialog closes, I see this:

POST /EPiServer/CMS/FileUpload/Upload
Status: 200
OK
Version: HTTP/1.1
Transferred: 507 B (120 B size)
Referrer Policy: no-referrer-when-downgrade

So a request was posted, but it was only 507 bytes, which means the image isn't being sent. (Weird that it would come back 200...)

barteksekula commented 4 years ago

Fixed in https://nuget.episerver.com/package/?id=EPiServer.Labs.ContentManager&v=0.2.2

deanebarker commented 4 years ago

Confirmed fix in 0.2.2.