Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 559079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:11:59+00:00 2026-05-13T12:11:59+00:00

we are trying to use the Google YouTube API to upload videos from our

  • 0

we are trying to use the Google YouTube API to upload videos from our website to YouTube through the browser directly.

The API works in two steps, in the first step we need to create an Video object with all the metadata like title,tags,description, category etc. Then we need to send a request with this object to YouTube and get a Token object generated as a response. This token object has a Token Value and a Token URL as its members.

In second step they suggest that we should create a Form with the action attribute set to the Token URL. This form should have a file upload control and a hidden field with the Token Value as its value. When this form is posted, it would upload the video to YouTube.

This works great if we have it as a two step process, asking users for the metadata first and then redirecting them on to second page for the actual video upload. However, we are trying to accomplish this in a single page, appearing as a single step to the user.

We have a MasterPage with the ‘aspnetForm’ specified in it, because of which we cant have another form with runat='server' property.

We have tried modifying the aspnetFrom’s action attribute using JavaScript/code-behind but it stays the same, whatever we do.

We have also tried to put another nested form, whose action tag would be set on the button click event, after the first response from YouTube with token is received. But even this doesn’t work, as the form isn’t created at the time this method is called..

We have tried several approaches but none seems to work.. any suggestions on this would be great.

If you have any more questions to understand the situation clearly.. please let me know..


Update:

Thanks for the responses guys.

We changed the business logic a little bit to resolve the issue. It was long back and I am not looking for a resolution as of now..

However, the question is still open and getting responses. I really appreciate all the help and hence, would leave the question open for any further discussions.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:12:00+00:00Added an answer on May 13, 2026 at 12:12 pm

    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.

    Then in the code that handles the postback, you can submit the metadata off to the YouTube API to get the Token Value.

    You then craft an HttpWebRequest with the Token Value passed into the Create method of the WebRequest object and set the Method property to Post. You then add the uploaded video (see dr evil’s answer to “Upload files with HTTPWebrequest (multipart/form-data)” for more a walk through of that), and when you call GetResponse() your file will be submitted.

    Things to watch out for:

    1. ScriptTimeout: 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.
    2. 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.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use YouTube API to upload videos from browser. I read Google
I am trying to use google maps API V3 to draw a line from
I'm trying to use the YouTube API to control several you-tube videos. And I'm
I'm creating an Android app and trying to use Google Places API through Google
I'm trying to use Google Analytics API to query internal searches that happen on
I'm trying to use Google's Images API to search an image and put it
I am trying to use the Google Map API- I've successfully managed to add
I am trying to use Google's OAuth2 API. In their generic documentation, they mention
I am trying to use Google Analytics with a MonoTouch application (iPhone). It works
I am trying to use the Google Wave Active Robot API fetch_wavelet() and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.