Iceshrimp.NET/Iceshrimp.Backend/Iceshrimp.Backend.csproj
Laura Hausmann 0668c6b360
[backend/drive] Improve media filename handling
This commit adds support for remote Content-Disposition headers giving information on attachment filenames, as well as providing this information when serving locally stored files. It also passes on any filename metadata to the object storage provider, if configured as the storage backend.
2024-07-09 23:44:34 +02:00

97 lines
5.6 KiB
XML

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<!-- ASP.NET MVC & Razor Pages don't support trimming yet (and everything else might also break) -->
<PublishTrimmed>false</PublishTrimmed>
<!-- Enables DATAS - https://www.thinktecture.com/en/net/optimize-asp-net-core-memory-with-datas -->
<GarbageCollectionAdaptationMode>1</GarbageCollectionAdaptationMode>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Iceshrimp.Frontend\Iceshrimp.Frontend.csproj"/>
<ProjectReference Include="..\Iceshrimp.Parsing\Iceshrimp.Parsing.fsproj"/>
<ProjectReference Include="..\Iceshrimp.Shared\Iceshrimp.Shared.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="AngleSharp" Version="1.1.2"/>
<PackageReference Include="AsyncKeyedLock" Version="6.4.2"/>
<PackageReference Include="Blurhash.ImageSharp" Version="3.0.0"/>
<PackageReference Include="dotNetRdf.Core" Version="3.2.7-iceshrimp"/>
<PackageReference Include="EntityFrameworkCore.Exceptions.PostgreSQL" Version="8.1.2"/>
<PackageReference Include="EntityFrameworkCore.Projectables" Version="3.0.4"/>
<PackageReference Include="FlexLabs.EntityFrameworkCore.Upsert" Version="8.0.0"/>
<PackageReference Include="Iceshrimp.ObjectStorage.S3" Version="0.34.2"/>
<PackageReference Include="Isopoh.Cryptography.Argon2" Version="2.0.0"/>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.6"/>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.6"/>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6"/>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6"/>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="8.0.6"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.6"/>
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="8.0.0"/>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4"/>
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.3"/>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2"/>
<PackageReference Include="System.IO.Hashing" Version="8.0.0"/>
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1"/>
<PackageReference Include="System.Text.Json" Version="8.0.3"/>
<PackageReference Include="Ulid" Version="1.3.3"/>
<PackageReference Include="Iceshrimp.WebPush" Version="2.0.0"/>
</ItemGroup>
<!-- We want Razor runtime compilation support, but only during development -->
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.5"/>
</ItemGroup>
<!-- If the build flag EnableLibVips is set, switch the ImageProcessor to LibVips (with ImageSharp as fallback) -->
<PropertyGroup Condition=" '$(EnableLibVips)' == 'true' ">
<DefineConstants>$(DefineConstants);EnableLibVips</DefineConstants>
</PropertyGroup>
<!-- If the build flag EnableLibVips is set, reference the .NET bindings for LibVips -->
<ItemGroup Condition=" '$(EnableLibVips)' == 'true' ">
<PackageReference Include="NetVips" Version="2.4.1"/>
</ItemGroup>
<!-- If the build flags EnableLibVips and BundleNativeDeps are set, reference the LibVips native dependecy -->
<ItemGroup Condition=" '$(EnableLibVips)' == 'true' And '$(BundleNativeDeps)' == 'true' ">
<PackageReference Include="NetVips.Native" Version="8.15.2-iceshrimp"/>
</ItemGroup>
<!-- This makes sure configuration.ini & the preloaded AS contexts are added to the assembly as embedded resources -->
<ItemGroup>
<EmbeddedResource Include="configuration.ini" CopyToOutputDirectory="Always"/>
<EmbeddedResource Include="Core\Federation\ActivityStreams\Contexts\*.json">
<TargetPath>contexts\%(Filename)%(Extension)</TargetPath>
</EmbeddedResource>
<Content Update="Core\Federation\ActivityStreams\Contexts\*.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</Content>
</ItemGroup>
<!-- This is a script used during development, and not needed in the final output -->
<ItemGroup>
<None Remove="Core\Database\prune-designer-cs-files.sh"/>
</ItemGroup>
<!-- This saves a bunch of disk space by discarding the original and gzip-compressed static assets. -->
<!-- For clients that don't support brotli, they will be transparently decompressed by the server. -->
<Target Name="KeepOnlyBrotliCompressedStaticAssets" AfterTargets="Publish">
<ItemGroup>
<CompressedFiles Include="$(PublishDir)\wwwroot\_framework\*.br"/>
<FilesToClean Include="@(CompressedFiles->'%(RootDir)%(Directory)%(Filename)')"/>
<FilesToClean Include="@(CompressedFiles->'%(RootDir)%(Directory)%(Filename).gz')"/>
</ItemGroup>
<Delete Files="@(FilesToClean->Exists())"/>
</Target>
</Project>