Help: Video from Camera to FormData


Hello fellow Ioners,

I was wondering if someone could help me how to approach this.
I’m capturing a video with cordova media-capture plugin, and I wish to transmit it with other data via a ‘FormData’ object as multipart form.

But the media-capture plugin exports this information:
“Video Recorded. Result:

I need to transfer the file into FormData object, but FormData requires a ‘File’ object.
How do I approach turning a file from its path to ‘File’ object? The element does not seem to be able to accept a path programmatically so I can retrieve the ‘File’ object.

I’m looking into cordova-file-plugin, but have did not made it to work yet.
Am I on the right track, or there is a simpler approach to do it?

Thank you in advance


Hello. Anyone on this?

I have been trying all this time to find a solution, but nothing worked.

I need to create a new ‘File’ object (like the one the ‘Input’ element provides, when you choose a file), but I don’t want to involve user interaction. I need to read a video file from storage, and then add add it to a FormData object.

Has anyone done this before?
I’m getting desperate here :sob:

Thank you in advance



same problem with me :frowning: