Reputation: 83
Hello I have a couple of questions.
-Is there a way to be able to either delete or rename a file on the client’s machine after he uploads the file via a file upload control to the server.
-This one is closer to a question that I asked before (link), would you be able to get the path of a uploaded file or move the uploaded file on a client’s computer if the client has IE Trusted Sites Security Zone for your website.
The overall problem is that Clients are uploading many files to a website. Once the file is uploaded it needs to be clear on the client's computer that the file already has been uploaded once so that they do not miss or re-upload the same file. If the file has been renamed, moved, or deleted upon upload then it would be difficult for them to miss or re-upload a file.
Upvotes: 1
Views: 1306
Reputation: 268344
No, you cannot delete files from the client's machine (not without some type of extension or parallel software running on the machine). I would instead encourage you to consider another route. When multiple files are selected for upload, you have access to their file names and file sizes via JavaScript:
fileupload.addEventListener( "change", function () {
console.log( this.files ); // FileList {0: File, 1: File, 2: File, length: 3}
});
I would suggest you send this list of details over to a server-side script that inspects them against a history of uploads from the current user. If matches exist, you can relay that information back to the user and allow them to modify their list of files to upload.
Upvotes: 2