I want to upload a video from an HTML form directly to Brightcove. We run Coldfusion 9 on our servers.
I can find instructions on uploading the video to my local server like this:
<cffile action="upload" nameconflict="makeunique" filefield="form.video_file" destination="#upload_path#" result="uploaded_file">
... and instructions on uploading a video from my local server to Brightcove like this:
<cfhttp url="#variables.apiBaseUrl#" method="post" timeout="#variables.timeout#" result="resultVar" multipart="true">
<cfhttpparam type="formfield" name="json" VALUE = "#arguments.jsonArgs#">
<cfhttpparam type="file" name="#getFileFromPath(arguments.filename)#" file="#arguments.filename#"/>
</cfhttp>
But not from the HTML form directly to Brightcove.
Is this possible?
Thanks! Nick
There are examples of how to upload directly from the browser to Brightcove in their JavaScript Media API Examples.
But, as the documentation notes, what you want to accomplish is not recommended for a few reasons:
If you're finding that the process for uploading to your server then to Brightcove is taking too long, you'll probably want to build a queue system.