doujingxi3356 2015-03-23 13:58
浏览 36

jQuery文件上载验证Serverside与/和Clientside

i've got a question regarding the blueimp jquery file upload and its validation.

I know that this file upload library gives me the opportunity to validate the added files with the validate.js file by configuring the fileupload as the following:

  $('#fileupload').fileupload({
    // Uncomment the following to send cross-domain cookies:
    //xhrFields: {withCredentials: true},
    url: uploadRoute
   /* acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
    maxFileSize: 3000000, // 3 MB
    // The minimum allowed file size in bytes:
    minFileSize: undefined, // No minimal file size
    // The limit of files to be uploaded:
    maxNumberOfFiles: 5,
    // Limit upload size with one request to 20 MB
    limitMultiFileUploadSize: 20000000 // 20 MB*/
});

This validation would happen in the front end, so js can be disabled and as i read it is not supported on older versions of browsers, e.g Internet Explorer 8/9. Therefore, i now 'just' implemented a server side check of the extension, size etc. within my file upload handler class.

Would you recommend me to use in addition to the server side check also the 'front end check' with javascript that the jquery file upload provides ? Or is the traffic caused by a server side e.g. extension check so small that there are no - let's call it - 'traffic risks' .. ?

Regards

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 vue3页面el-table页面数据过多
    • ¥100 vue3中融入gRPC-web
    • ¥15 kali环境运行volatility分析android内存文件,缺profile
    • ¥15 写uniapp时遇到的问题
    • ¥15 vs 2008 安装遇到问题
    • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率
    • ¥15 找一个网络防御专家,外包的
    • ¥100 能不能让两张不同的图片md5值一样,(有尝)
    • ¥15 informer代码训练自己的数据集,改参数怎么改
    • ¥15 请看一下,学校实验要求,我需要具体代码