It might have something to do with the size of the video, by default only 4MB files can be accepted by ASP.NET. Can you get the full error message/stacktrace ?
I use two video files for testing, one .mp4 file that has 375 kb in size, the other file is a .webm of 2.07 mb.
Same error for both files.
Can upload images larger than 4 mb without problems.
If I check the network tab in Chrome Developer Tools, I get this JSON response:
[{"index":0,"fileName":"small.mp4","errorMessage":"Object reference not set to an instance of an object.","contentLink":null}]
Nothing is logged in the log file.
No stack trace,
Error message appears in the file upload box, so it will not be a total crash of site.
Cannot share link to an image for any reason.
I used same code in the Alloy demo site it works fine for me and able to upload more than 4MB size file. You can try with below settings.
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
<location path="EPiServer">
<system.web>
<httpRuntime maxRequestLength="1048576" requestValidationMode="2.0" executionTimeout="7200" />
</system.web>
</location>
Hi Ompa
Are you able to see your VideoMediaData inside "Media Type" in CMS->Admin->Content Type?
Can you try renaming this "VideoMediaData" class with some other name and give a try?
Hello.
Have added these lines to Web.config, but it remains the same problem.
I have created an empty CMS site and there is also a Commerce installed. Installed according to the documentation.
So is it something I miss, something that Alloy comes with but that doesn't come with an empty CMS installation?
I see VideoMediaData under MediaTypes. The other media types are also there.
Hi.
Deleted the class completely, created it again with a new name, and now it works.
Thank you all for your help!
Hello.
I'm having trouble uploading video files.
Has the following code:
Have no problems uploading images and for example PDF files with similar solution.
Error messages I get when uploading video files are:
Object reference not set to an instance of an object.
Any thoughts on why it doesn't work and maybe some suggestion on some solution I can try?