cloudconvert / cloudconvert-dotnet

CloudConvert .NET SDK
Other
20 stars 15 forks source link

`parameters` parameter on `UploadAsync` is optional but throws if not provided #12

Closed rmjohnson closed 2 years ago

rmjohnson commented 2 years ago

I was surprised that parameters is an optional parameter here but as soon as it gets passed to GetParameters, the ToList() will throw an ArgumentNullException if parameters is null. Should GetParameters be able to handle a null parameters parameter?

EDIT: I realized this is expecting the Parameters property from Result.Form on my upload task. Maybe it shouldn't be optional? I'm not sure.

josiasmontag commented 2 years ago

The parameter is required, so yes it should not have null as default value.

rmjohnson commented 2 years ago

@josiasmontag, gotcha! I just created a PR with this change: https://github.com/cloudconvert/cloudconvert-dotnet/pull/13