Skip to content

Commit

Permalink
Add support for .net frameworks 472 48, .net6, .netstandard2
Browse files Browse the repository at this point in the history
  • Loading branch information
kev-le committed Nov 9, 2023
1 parent 4816927 commit f3d3654
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion StudioClient/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public async Task<dynamic> GetJobByName(string jobName)

public async Task<dynamic> UpdateJob(long jobId, object payload)
{
return await Request($"jobs/{jobId}", HttpMethod.Patch, payload);
return await Request($"jobs/{jobId}", HttpMethod.Put, payload);
}

public async Task<dynamic> QueueJob(long jobId, object payload)
Expand Down
2 changes: 1 addition & 1 deletion StudioClient/Photo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task<dynamic> UploadPhoto(string photoPath, string modelName, long

dynamic photo = await CreatePhoto(photoObject);

byte[] photoData = await File.ReadAllBytesAsync(photoPath);
byte[] photoData = File.ReadAllBytes(photoPath);
if (photoData.Length > 0 && ((photoData.Length / 1024 / 1024) > MAX_PHOTO_SIZE))
{
throw new Exception($"{photoPath} exceeds 27MB");
Expand Down
9 changes: 6 additions & 3 deletions StudioClient/StudioClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@
<PropertyGroup>
<PackageId>SkylabStudio</PackageId>
<PackageTitle>Skylab Studio Client</PackageTitle>
<Version>0.0.1</Version>
<Version>0.0.3</Version>
<Description>.NET client to interface with Skylab Studio Public API</Description>
<Company>Skylab Technologies Inc.</Company>
<Authors>skylabtech</Authors>
<LangVersion>latest</LangVersion>
<PackageProjectUrl>https://github.com/skylab-tech/studio_client_dotnet</PackageProjectUrl>
<PackageIconUrl>https://avatars.githubusercontent.com/u/45469060</PackageIconUrl>
<PackageTags>studio skylab skylabtech api library .net nuget</PackageTags>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net47;net472;net48;net6.0;net7.0;netstandard2.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright (c) Skylab Technologies Inc. 2023</Copyright>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNet.WebApi.SelfHost" Version="5.3.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<None Include="..\README.md" Pack="true" PackagePath="\"/>
<None Include="..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>

0 comments on commit f3d3654

Please sign in to comment.