Hello and thanns for the package. Here is my question.
We use the package successfully. Upload works fine. We had a request to save the video duration on the database when the file is uploaded. For this, we added code to the MASObjectResolver of MulterAzureStorage.
Before returning the metadata object, we convert the stream to a buffer and caclculate the duration of the video with a helper function. When we do this, the file is uploaded with size of 0. When we skip the duration caclulation, the file is uploaded normally.
As i take it, with my very limited experience, once the stream is somehow used it is also consumed, or something along those lines.
Could you give me some directions of how to accomplish this, as our last resort which is uploading the file and then downloading it againt to caclulate the duration is far from good.
In general, is there any way to get hold of the file raw data before or after uploading?
Thanks a lot, and once again thanks for your work.
Hello and thanns for the package. Here is my question.
We use the package successfully. Upload works fine. We had a request to save the video duration on the database when the file is uploaded. For this, we added code to the MASObjectResolver of MulterAzureStorage.
Before returning the metadata object, we convert the stream to a buffer and caclculate the duration of the video with a helper function. When we do this, the file is uploaded with size of 0. When we skip the duration caclulation, the file is uploaded normally.
As i take it, with my very limited experience, once the stream is somehow used it is also consumed, or something along those lines.
Could you give me some directions of how to accomplish this, as our last resort which is uploading the file and then downloading it againt to caclulate the duration is far from good.
In general, is there any way to get hold of the file raw data before or after uploading?
Thanks a lot, and once again thanks for your work.