Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would create a form that you display to the user with text fields for the metadata and a file upload control for the video.</p> <p>Then in the code that handles the postback, you can submit the metadata off to the YouTube API to get the Token Value.</p> <p>You then craft an <a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx" rel="nofollow noreferrer">HttpWebRequest</a> with the Token Value passed into the <code>Create</code> method of the <code>WebRequest</code> object and set the <code>Method</code> property to <code>Post</code>. You then add the uploaded video (see <a href="https://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data/567460#567460">dr evil's answer to "Upload files with HTTPWebrequest (multipart/form-data)"</a> for more a walk through of that), and when you call <code>GetResponse()</code> your file will be submitted.</p> <p>Things to watch out for:</p> <ol> <li><code>ScriptTimeout</code>: If you're allowing your users to upload large files to YouTube - if it takes a while for you to transmit it, then your script could be terminated prematurely.</li> <li>Bandwidth: You'll have both the upload to your servers and then the upload to YouTube to account for - by allowing the user to upload directly to YouTube in a two step process you never touch the video, and it never goes near your servers - this might be an issue for you or your hosting provider - for example, my host doesn't count traffic through FTP in my monthly bandwidth, but does include files uploaded/downloaded through the website.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload