config.paperclip_defaults = {
storage: :s3,
s3_credentials: {
bucket: ENV.fetch('S3_BUCKET_NAME'),
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
s3_region: ENV.fetch('AWS_REGION'),
}
}
Profils =字符串列表
SelectedProfil = string
在帖子
上,SelectedProfil对于控制器始终为空答案 0 :(得分:0)
简单地
using (Html.BeginForm("Add", "Test", FormMethod.Post))
@Html.DropDownList("profil", new SelectList(Model.Profils.Select(x => new { Value = x, Text = x }),"Value","Text")))
[HttpPost]
public ActionResult Add(string profil)
{
....
}