I've searched about that in the SO, but there solutions with video file's path. I need to get file's duration by InMemoryFileUpload or BytesIO in django. How can do that?
from moviepy.editor import VideoFileClip
def video_skip_validator(data):
video_file = data.get("video")
video = VideoFileClip(video_file)
print(video.duration)
It raises 'InMemoryUploadedFile' object has no attribute 'endswith'
error.