I am using the Asset Manager API to get the video in inputStream from a URL and then calling the createAsset function on it. All the attributes passed have non-null values in it. Still, the createAsset function fails with a Null Pointer Exception when I am trying it for videos. However, while uploading the image files to DAM, this method works. I am setting the mimeType to be video/mp4. Below is the erroneous code-
So, despite of having all the values within the attributes, I am unable to get as to why the createAsset() function is failing. Is it something to do with just the videos?
I have also tried createAssetBinary() function that does not throw any exception, but, also does not create any asset in the DAM. Any insights on this will be helpful. Or if I could get some reference for saving a video asset in DAM from any source URL, that would be helpful as well.