增加png bmp gif jpeg多种图片格式
This commit is contained in:
parent
540ca2f18f
commit
9e20c02525
|
@ -21,7 +21,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
if (files.Count > 0 && !LgbPrincipal.IsAdmin(userName))
|
||||
{
|
||||
var webSiteUrl = DictHelper.RetrieveIconFolderPath().Code;
|
||||
var fileName = string.Format("{0}.jpg", userName);
|
||||
var fileName = string.Format("{0}{1}", userName, Path.GetExtension(files[0].FileName));
|
||||
var fileUrl = string.Format("{0}{1}", webSiteUrl, fileName);
|
||||
var filePath = HttpContext.Current.Server.MapPath(fileUrl);
|
||||
var fileFolder = Path.GetDirectoryName(filePath);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
$('#fileIcon').fileinput({
|
||||
uploadUrl: Infos.url,
|
||||
language: 'zh',
|
||||
allowedFileExtensions: ['jpg'],
|
||||
allowedFileExtensions: ['jpg', 'png', 'bmp', 'gif', 'jpeg'],
|
||||
initialPreview: [
|
||||
preIcon
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue