Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<PackageProjectUrl>https://github.com/squidex/squidex</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>8.0.0</Version>
</PropertyGroup>
<Version>8.0.1</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
Expand Down
5 changes: 3 additions & 2 deletions assets/Squidex.Assets.S3/AmazonS3AssetStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ public async Task<long> UploadAsync(string fileName, Stream stream, bool overwri
DisableDefaultChecksumValidation = false,
};

if (stream.GetLengthOrZero() <= 0)
if (!stream.CanSeek)
{
await using (var tempStream = TempHelper.GetTempStream())
{
await stream.CopyToAsync(tempStream, ct);
tempStream.Position = 0;

request.InputStream = tempStream;

Expand All @@ -267,7 +268,7 @@ public async Task<long> UploadAsync(string fileName, Stream stream, bool overwri
}
else
{
request.InputStream = new SeekFakerStream(stream);
request.InputStream = stream;
request.AutoCloseStream = false;

await s3Transfer.UploadAsync(request, ct);
Expand Down
1 change: 1 addition & 0 deletions assets/Squidex.Assets.S3/Squidex.Assets.S3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="4.0.19.1" />
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.5.20" />
<PackageReference Include="Meziantou.Analyzer" Version="3.0.26">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Loading