mux-csharp's People
mux-csharp's Issues
CreateAssetAsync() - how to upload video from a local file
Hello,
I am trying to create a new video asset from a local video file. The CreateAssetAsync()
method's CreatesAssetRequest
has the Url
field, but I am not able to figure out how to upload a local file.
Example code:
using mux = Mux.Csharp.Sdk.Client;
mux.Configuration config = new();
config.BasePath = "https://api.mux.com";
config.Username = "9074...";
config.Password = "XtR....";
var api = new AssetsApi(config);
var request = new CreateAssetRequest
{
Test = true,
PlaybackPolicy = new List<PlaybackPolicy> { PlaybackPolicy.Signed },
Input = new List<InputSettings> { new InputSettings {
Type = InputSettings.TypeEnum.Video,
//Url = @"c:\Users\Radek\Desktop\test AT media\sample-mp4-file-small.mp4"
//Url = "file:///c:/Users/Radek/Desktop/test AT media/sample-mp4-file-small.mp4"
----> how should I specify a local file here????
} }
};
AssetResponse response = await api.CreateAssetAsync(request);
return response ?? throw new Exception("MUX API CreateAssetAsync did not return any data");
I can see that the Post<T>
method in ApiClient.cs
supports posting files via the RequestOptions
parameter, however the CreateAssetAsync()
method does not contain any code to pass the filestream to the RequestOptions.Data
property.
Can you suggest what am I doing wrong?
Thanks.
R.
The project should use the dependabot to keep its dependencies up to date.
All docs links in the /src directory are 404s
In the file src\Mux.Csharp.sdk\REAMDME.md
all the links for docs 404
as they are assuming the file is in the route of the project.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.