|
@@ -145,8 +145,8 @@ $(document).ready(function() {
|
|
|
$('#sign-upload').change(function () {
|
|
|
const file = this.files[0];
|
|
|
const filesize = file.size;
|
|
|
- if (filesize > 1 * 1024 * 1024) {
|
|
|
- toastr.error('上传的文件大小不能超过1MB!');
|
|
|
+ if (filesize > 0.5 * 1024 * 1024) {
|
|
|
+ toastr.error('上传的文件大小不能超过512KB!');
|
|
|
return false;
|
|
|
}
|
|
|
const ext = file.name.toLowerCase().split('.').splice(-1)[0];
|
|
@@ -187,8 +187,8 @@ $(document).ready(function() {
|
|
|
return
|
|
|
}
|
|
|
const filesize = file.size;
|
|
|
- if (filesize > 1 * 1024 * 1024) {
|
|
|
- toastr.error('上传的文件大小不能超过1MB!');
|
|
|
+ if (filesize > 0.5 * 1024 * 1024) {
|
|
|
+ toastr.error('上传的文件大小不能超过512KB!');
|
|
|
return false;
|
|
|
}
|
|
|
formData.append('file[]', file);
|