Merge branch 'master' of https://toscode.gitee.com/frane-yang/sggl_cd
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
@@ -27,6 +28,8 @@ namespace WebAPI.Controllers
|
||||
{
|
||||
typeName = "WebApi";
|
||||
}
|
||||
// 定义允许上传的文件类型列表
|
||||
List<string> allowExtensions = BLL.DropListService.allowExtensions;
|
||||
string reUrl = string.Empty;
|
||||
if (files != null && files.Count > 0)
|
||||
{
|
||||
@@ -36,12 +39,17 @@ namespace WebAPI.Controllers
|
||||
{
|
||||
Directory.CreateDirectory(localRoot);
|
||||
}
|
||||
|
||||
foreach (string key in files.AllKeys)
|
||||
{
|
||||
string rootUrl = string.Empty;
|
||||
string fileName = string.Empty;
|
||||
string extensionstr = string.Empty;
|
||||
HttpPostedFile file = files[key];//file.ContentLength文件长度
|
||||
if (!allowExtensions.Contains(Path.GetExtension(file.FileName)))
|
||||
{
|
||||
return BadRequest($"Invalid file extension: {file.FileName}");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(file.FileName))
|
||||
{
|
||||
extensionstr = Path.GetExtension(file.FileName).ToLower();
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件
|
||||
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<publishUrl>D:\SGGLAPI</publishUrl>
|
||||
<DeleteExistingFiles>True</DeleteExistingFiles>
|
||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
||||
<EnableUpdateable>True</EnableUpdateable>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -326,7 +326,6 @@
|
||||
<Content Include="Areas\HelpPage\Views\Help\DisplayTemplates\CollectionModelDescription.cshtml" />
|
||||
<Content Include="Areas\HelpPage\Views\Help\DisplayTemplates\ApiGroup.cshtml" />
|
||||
<Content Include="Areas\HelpPage\Views\Help\Api.cshtml" />
|
||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
|
||||
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
|
||||
<Content Include="Scripts\jquery-3.3.1.js" />
|
||||
<Content Include="Scripts\jquery-3.3.1.min.js" />
|
||||
@@ -361,6 +360,7 @@
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Images\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Properties\PublishProfiles\" />
|
||||
<Folder Include="Views\Login\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user