FineUploader S3 如何设置内容长度范围?
How to set content-length-range in FineUploader S3?
当通过验证设置 content-length-range
时,会导致大于该大小的文件根本无法添加到上传器:
validation: {
sizeLimit: 1048576
},
如何只设置 content-length-range
而没有任何其他 bells/whistles?
最简单的解决方案是离开 validation.sizeLimit
option alone in this case and set a properly formatted content-length-range
parameter via the request.params
option. Fine Uploader S3 will include these params in the policy document (if a policy document is used). Another option would be to maintain two separate Fine Uploader instances. One instance accepts files from the user w/out validation
. That instance is also used to scale images, which are then passed into the "main" Fine Uploader S3 instance via the addFiles
API method。此 "main" 实例已设置 validation
。
当通过验证设置 content-length-range
时,会导致大于该大小的文件根本无法添加到上传器:
validation: {
sizeLimit: 1048576
},
如何只设置 content-length-range
而没有任何其他 bells/whistles?
最简单的解决方案是离开 validation.sizeLimit
option alone in this case and set a properly formatted content-length-range
parameter via the request.params
option. Fine Uploader S3 will include these params in the policy document (if a policy document is used). Another option would be to maintain two separate Fine Uploader instances. One instance accepts files from the user w/out validation
. That instance is also used to scale images, which are then passed into the "main" Fine Uploader S3 instance via the addFiles
API method。此 "main" 实例已设置 validation
。