-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add webkitRelativePath to dragdrop with multiple folders (#190)
* File folder path drag drop (#1) * . * Add TypeScript MSBuild * Add Check in GetFiles for missing files. Get from dragdrop instead. * Update Demos * Use native input functionality for drag / drop. Add option to switch between using webkitdirectory. Use div / ondrop to drop multiple folders and files. * Move property to non standard properties * Update Demo * Fix/Cleanup * Fix async issue * remove try catches not needed and rethrow others
- Loading branch information
Showing
28 changed files
with
1,635 additions
and
1,273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,93 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks> | ||
<BlazorLinkOnBuild>true</BlazorLinkOnBuild> | ||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> | ||
<LangVersion>latest</LangVersion> | ||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> | ||
<Authors>Tor Knutsson (Tewr)</Authors> | ||
<PackageProjectUrl>https://github.com/Tewr/BlazorFileReader</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/Tewr/BlazorFileReader</RepositoryUrl> | ||
<Description>Create Read-Only file streams from file input elements or drop targets in Blazor.</Description> | ||
<PackageTags>blazor blazor-component stream filestream file-stream read-file filereader</PackageTags> | ||
<Configurations>Debug;Release;Ghpages</Configurations> | ||
<PackageId>Tewr.Blazor.FileReader</PackageId> | ||
<PackageReleaseNotes>fixes a bug under net6 that would throw PlatformNotSupportedException</PackageReleaseNotes> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<RazorLangVersion>3.0</RazorLangVersion> | ||
<AssemblyName>Tewr.Blazor.FileReader</AssemblyName> | ||
<RootNamespace>Tewr.Blazor.FileReader</RootNamespace> | ||
<AssemblyVersion>3.3.1.21360</AssemblyVersion> | ||
<Version>3.3.1.21360</Version> | ||
<FileVersion>3.3.1.21360</FileVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="icon.png" Pack="true" Visible="false" PackagePath="" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<NoWarn>1701;1702;NU5104</NoWarn> | ||
<DocumentationFile>Tewr.Blazor.FileReader.xml</DocumentationFile> | ||
</PropertyGroup> | ||
|
||
<Target Name="BundleTypescript" BeforeTargets="CreateManifestResourceNames" Condition="'$(Configuration)'=='Debug'"> | ||
<!-- using ts-bundle to create a single output js file from several ts files --> | ||
<Exec Command="tsc-bundle $(ProjectDir)tsconfig.json --outFile $(ProjectDir)wwwroot\FileReaderComponent.js --entryPoint FileReaderComponent --transform tsPreprocessor.js" /> | ||
</Target> | ||
|
||
|
||
<ItemGroup> | ||
<!-- .js/.css files will be referenced via <script>/<link> tags; other content files will just be included in the app's 'dist' directory without any tags referencing them --> | ||
<EmbeddedResource Include="wwwroot\**\*.js" LogicalName="blazor:js:%(RecursiveDir)%(Filename)%(Extension)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)'=='net5.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.3" /> | ||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="tsconfig.json"> | ||
<Pack>false</Pack> | ||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Extensions\" /> | ||
<Folder Include="wwwroot\" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="vsxmd" Version="1.4.5"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'"> | ||
<DefineConstants>$(DefineConstants);NETSTANDARD20</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)'=='net5.0'"> | ||
<DefineConstants>$(DefineConstants);NET5</DefineConstants> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks> | ||
<BlazorLinkOnBuild>true</BlazorLinkOnBuild> | ||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> | ||
<LangVersion>latest</LangVersion> | ||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> | ||
<Authors>Tor Knutsson (Tewr)</Authors> | ||
<PackageProjectUrl>https://github.com/Tewr/BlazorFileReader</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/Tewr/BlazorFileReader</RepositoryUrl> | ||
<Description>Create Read-Only file streams from file input elements or drop targets in Blazor.</Description> | ||
<PackageTags>blazor blazor-component stream filestream file-stream read-file filereader</PackageTags> | ||
<Configurations>Debug;Release;Ghpages</Configurations> | ||
<PackageId>Tewr.Blazor.FileReader</PackageId> | ||
<PackageReleaseNotes>fixes a bug under net6 that would throw PlatformNotSupportedException</PackageReleaseNotes> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<RazorLangVersion>3.0</RazorLangVersion> | ||
<AssemblyName>Tewr.Blazor.FileReader</AssemblyName> | ||
<RootNamespace>Tewr.Blazor.FileReader</RootNamespace> | ||
<AssemblyVersion>3.3.1.21360</AssemblyVersion> | ||
<Version>3.3.1.21360</Version> | ||
<FileVersion>3.3.1.21360</FileVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="icon.png" Pack="true" Visible="false" PackagePath="" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<NoWarn>1701;1702;NU5104</NoWarn> | ||
<DocumentationFile>Tewr.Blazor.FileReader.xml</DocumentationFile> | ||
</PropertyGroup> | ||
|
||
<Target Name="BundleTypescript" BeforeTargets="CreateManifestResourceNames" Condition="'$(Configuration)'=='Debug'"> | ||
<!-- using ts-bundle to create a single output js file from several ts files --> | ||
<Exec Command="tsc-bundle $(ProjectDir)tsconfig.json --outFile $(ProjectDir)wwwroot\FileReaderComponent.js --entryPoint FileReaderComponent --transform tsPreprocessor.js" /> | ||
</Target> | ||
|
||
|
||
<ItemGroup> | ||
<!-- .js/.css files will be referenced via <script>/<link> tags; other content files will just be included in the app's 'dist' directory without any tags referencing them --> | ||
<EmbeddedResource Include="wwwroot\**\*.js" LogicalName="blazor:js:%(RecursiveDir)%(Filename)%(Extension)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)'=='net5.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.3" /> | ||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="tsconfig.json"> | ||
<Pack>false</Pack> | ||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Extensions\" /> | ||
<Folder Include="wwwroot\" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.0.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="vsxmd" Version="1.4.5"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'"> | ||
<DefineConstants>$(DefineConstants);NETSTANDARD20</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)'=='net5.0'"> | ||
<DefineConstants>$(DefineConstants);NET5</DefineConstants> | ||
</PropertyGroup> | ||
|
||
</Project> |
Oops, something went wrong.