只要zip文件
大石头 authored at 2023-03-10 09:54:07
580.00 B
Stardust
@model ValueTuple<IEntity, DataField>
@using NewLife;
@using NewLife.Cube
@using NewLife.Cube.ViewModels;
@using XCode;
@using XCode.Configuration;
@{
    var entity = Model.Item1;
    var field = Model.Item2;

    var value = entity[field.Name] as String;

    var accept = "application/zip,application/x-zip,application/x-zip-compressed";
}
@Html.TextBox(field.Name, entity[field.Name], new { @class = "form-control" })
@Html.TextBox(field.Name+"_attachment", entity[field.Name], new { type = "file", accept })
@if (!value.IsNullOrEmpty())
{
    <a href="@value">下载</a>
}