/// <summary> /// <para>The event handler called by the .NET Client Library upon initialization of the resumable session URI.</para> /// <para>This event handler is not needed if your application will not support resuming after a program restart.</para> /// <para>*</para> /// <para>Called once for each file after the upload has been initialized and the resumeable session URI (UploadUri) is available.</para> /// <para>The example is for a Windows Desktop application. Change the contents of this method to suit your tastes and platform.</para> /// <para>*</para> /// <para>It is strongly recommended that the full path filename be saved along with the UploadUri string value so that</para> /// <para>upon program restart, the full path filename can be compared with the full path filename currently opened.</para> /// <para>See GetSessionRestartUri() in this sample proggram.</para> /// </summary> /// <param name="uploadSessionData">ResumeableUploadSessionData Class object containing the resumable session URI (UploadUri)</param> static void VideoInsertRequest_UploadSessionData(IUploadSessionData uploadSessionData) { // Save UploadUri.AbsoluteUri and FullPath Filename values for use if program faults and we want to restart the program Properties.Settings.Default.ResumeUri = uploadSessionData.UploadUri.AbsoluteUri; Properties.Settings.Default.ResumeFilename = VIDEOFULLPATHFILENAME; // Saved to a user.config file within a subdirectory of C:\Users\<yourusername>\AppData\Local Properties.Settings.Default.Save(); }
private void OnYoutubeUploadStart(IUploadSessionData resumable) { CurrentUpload.UploadUrl = resumable.UploadUri; SaveSettings(); }