问题描述
我在我的应用程序中使用kendo文件上传控件。例如,我选择一个20 MB大小的文件。请求发送到服务器,需要将这个文件上传到azure +插入一个指向blob的数据库项。问题是,如果服务器传输了所有的字节到其自身,其余的操作需要一段时间(如上传文件和插入一个条目到数据库),同时,用户从客户端取消上传,它被取消在客户端上,但服务器仍然继续上传。
我该如何处理?任何想法?
谢谢!
看看这个帖子和回覆在stackoverflow的卢卡斯,并使用kendo上传取消事件。
I am using kendo file upload control in my application. I select a file of 20 MB size for example. The request goes to the server which needs to upload this document to azure + insert a DB entry pointing to the blob.
Issue is, if the server has all the bytes transferred to itself and the rest of the operations takes sometime (like uploading the file and inserting an entry to DB) and at the same time, user cancels upload from client, it gets cancelled on the client end BUT server still goes ahead with the upload.How should I handle this? Any thoughts?
Thanks!
Look into this post and answer of Lukas on stackoverflow and make use of cancel event in the kendo upload.
How to stop file transfer if browser is closed/upload cancelled
这篇关于取消客户端上的服务器上的文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!