Skip to content

How we can upload videos in certain folder using Dotnet vimeo? #181

@sunilpaul355

Description

@sunilpaul355

Hi All,
Please help me , Thanks in advance.
I have sent an email to vimeo support but after a long discussion I came to know raise an issue on this portal.
I am trying to implement vimeo video uploading in my MVC C# application. So I have install it from nuget package. Also downloaded zip file project from github for better understanding.
Here the are providing methods to upload videos in various format like (Filepath, Binary stream, locations) Also we can add name and description related to video.
Below is the screenshot:
image

There is not option for folder_uri, Please help me how I can pass Folder_Uri while uploading video.

My Vimeo account details are below:
Client Name: Sunil Kumar,
Email ID: Sunilpaul033@gmail.com
Client Identifier: "c745f56e32ff42e457798c01738e259daee259df"
Client_Secrets:"CswN8KZMFIHTUl87ctoP2qvknTsITHLpR1EMR80RhrAfNSJaFIhFTBl1G7utx4HRIqNa+2rC8rxy10em/KBTaOiWO6ZgjYPLSSvk0ro1qRuRBtRPbFZuTBzmcNOm+vzu"
Access_Token:"467ec747549bc6382fe98a591f904673"
Problem Facing : How I can upload videos in certain folder? I want to upload under folder url : https://vimeo.com/manage/folders/15433913
folder_uri : "/users/69385311/projects/15433913"
No model property for folder_uri in class VideoUpdateMetadata.

My controller request:

public async Task UploadFileByPath()
{
try
{
VimeoClient client = new VimeoClient(_accessToken);
long length;
string tempFilePath = Server.MapPath("~/Videos/Pexels.mp4");
IUploadRequest completedRequest;

            using (var file = new BinaryContent(tempFilePath))
            {
                file.OriginalFileName = "Pixcel.mp4";
                file.ContentType ="video/mp4";
                length = file.Data.Length;
                completedRequest = await client.UploadEntireFileAsync(file);
                VideoUpdateMetadata metaData = new VideoUpdateMetadata()
                {
                    Name = "Pexels.mp4",
                    Description = "Uploading Testing video",            
                };

                await client.UpdateVideoMetadataAsync(completedRequest.ClipId.Value, metaData);
               
            }

            return Json(completedRequest, JsonRequestBehavior.AllowGet);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

Thanks
Sunil Kumar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions