我正在尝试扩展他的默认Web Api授权属性,以允许经过身份验证的用户访问一组操作,即使它们未在应用程序中注册(例如,他们没有角色).
public class AuthorizeVerifiedUsersAttribute : AuthorizeAttribute
{
/// <summary>
/// Gets or sets the authorized roles.
/// </summary>
public new string Roles { get { return base.Roles; } set { base.Roles = value; } }
/// <summary>
/// Gets or sets the authorized users.
/// </summary>
public new string Users { get { return base.Users; } set { base.Users = value; } }
private bool _bypassValidation;
/// <summary>
/// Gets of sets a controller or an action as an …Run Code Online (Sandbox Code Playgroud) 目标是能够从Android设备上的Google相册中选择多张照片,然后使用常规的html文件输入控件将其上传。
我可以选择多张照片,但只能上传一张。
使用图库,我可以上传多张照片。知道为什么吗?
这是一个测试器:https : //jsfiddle.net/7sL1v46e/
<input id="fileInput" type="file" multiple accept="image/*">
Run Code Online (Sandbox Code Playgroud)
当选择多个文件时,所选文件的数目将显示在文件输入的前面。
编辑1:包含属性accept =“ image / *”。如果照片来源是Google相册,仍然无法正常工作
我们正在使用Html,AngularJs 1.6.X,Dropzone.JS 4.3,加载图像和Azure Blob存储.
在客户端图像是:
有时会将图像上传到左上角放大.
有关如何诊断和解决问题的任何想法?
提前致谢.
我们提供存储在 Azure Blob 容器上的私有资源(图像、文件等)。
安全性是使用为每个资源请求创建的共享访问签名来实现的,例如,两个请求意味着两个不同的访问令牌。
一般来说,安全 URL 由文件名和作为查询字符串传递的令牌组成,例如https://myaccount.blob.core.windows.net/file.img?sv=2015-04-05&ss=bf&srt=s&st =2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=F%6GRVAZ5Cdj2Pw4tgU7IlSTkWgn7bUkk Ag8P6HESXwmf%4B
资源的响应包含 Cache-Control 标头 (Cache-Control:max-age=31536000?
图像和视频类型的资源使用常规 HTML 或元素出现在网站中。
浏览器可以缓存以这种方式提供的资源吗?
感谢大家!