Hello,
As I know it is not possible to upload the whole folder/directory using RadAsyncUpload control.
However, when I drag and drop folder, it is accepted, but upload fails of course.
Is there any way to cancel drop folder event?
I tried something like this:
And on server side
But then all uploaded files are lost, not just the problematic folder.
Alternately I when process uploaded files I can ignore those where the ContentLength is 0, but this also makes problems when user wants to upload empty file.
Thanks
Marko
As I know it is not possible to upload the whole folder/directory using RadAsyncUpload control.
However, when I drag and drop folder, it is accepted, but upload fails of course.
Is there any way to cancel drop folder event?
I tried something like this:
function
OnClientFileUploaded(sender, eventArgs) {
if
(eventArgs.get_fileInfo().ContentLength == 0 && eventArgs.get_fileInfo().ContentType ==
null
) {
$(
"#"
+
"<%= hfRemoveFileIndex.ClientID %>"
).val(eventArgs.get_fileInfo().Index);
$(
"#"
+
"<%= btnRemoveFile.ClientID %>"
).click();
}
}
protected
void
btnRemoveFile_OnClick(
object
sender, EventArgs e)
{
int
indexID =
int
.Parse(hfRemoveFileIndex.Value);
RadAsyncUpload1.UploadedFiles.RemoveAt(indexID);
}
Alternately I when process uploaded files I can ignore those where the ContentLength is 0, but this also makes problems when user wants to upload empty file.
Thanks
Marko