Hello @Chocobozzz & everyone,
Does anyone know how to get the videoId when the video is uploaded/imported but not published yet?
Currently, I am working on a plugin that requires a unique Id of the video. When I upload/import the video, the video gets saved in the
storage/videos folder with unique name (eg:
ab5aed7e-c454-42ee-a366-41a10f234b35-720.mp4) and side by-side the details are recorded in the database as well (video and videoFile Table).
I was able to get the upload request and response using the
action:api.video.uploaded hook. But the response from the hook does not include the videoId that matches the record from the database. Although the video file name is included in the response it doesn’t match the video file name in the storage/videos when transcoding is enabled.
Image1: video uploaded successfully
Image2: response from upload using
Image3: videos in
storage/videos after transcoding
Image4: videos in database
So, is there a way to get the videoId when the video is uploaded 100% without publishing?