Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sunilpaul355 opened this issue Mar 22, 2023 · 2 comments
Open

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

sunilpaul355 opened this issue Mar 22, 2023 · 2 comments

Comments

@sunilpaul355
Copy link

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: [email protected]
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

@SandipJawaleRN
Copy link

await client.MoveVideoToFolder(15433913, completedRequest.ClipId.Value);

@onlinebustech
Copy link

@mfilippov I'm running into the same issue as the OP and am currently using the workaround of upload then move, but have a permissions based need to actually upload to a specific folder. This would potentially require adding capability to include the folder_uri param in with the metadata to support the function of the API. However, since that param is not something that can actually be updated via an update, it probably doesn't belong on the VideoUpdateMetadata object. So, I was thinking about extending the VideoUpdateMetadata and creating a VideoUploadMetadata object that inherits VideoUpdateMetadata and overrides the GetParameterValues to return both the base/update params as well as any defined in the VideoUploadMetadata that are upload specific. That would create a non-breaking change that allows consumers to use either the Upload or Update object on the call to the upload and get the additional supported feature(s).

I'd be willing to make the update and submit a pull request, but figured I'd check in to see if you think it's something you'd want/be open to see implemented.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants