This is a migrated thread and some comments may be shown as answers.

Individual metadata for Remove action

2 Answers 83 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gerald
Top achievements
Rank 1
Gerald asked on 27 Apr 2011, 11:14 AM


The Idea is that when the upload was successful Json returns a Guid

return Json(new { AttmGuid = LastGuidString }, "text/plain");

This should be returned to the server when Remove is selected, but how to bind each specific returned Id to each relevant button.   

 

.Remove("RemoveAttachment", "Messaging", new { attachmentId = GetBound_AttmGuid} )

 

 

Does anyone has an idea how this could be possible?

 

Thanks GK

 

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Gerald
Top achievements
Rank 1
answered on 28 Apr 2011, 03:59 PM
I just fund this great example:
uploading-files-to-a-database

it basically does what I need.

But it also solves reinitializing problem asked by Mark and multiple files upload is possible as well.

Cheers Gerald

0
Gerald
Top achievements
Rank 1
answered on 28 Apr 2011, 05:43 PM
Hello Admin,
Do you think this is a good idea? to get this done: 

I DB Example I wanted to show upload progess during upload again.

1. Reactivate file list
// Schow the file list 
 .ShowFileList(true)

 

2. delete on success

<script type="text/javascript">
    function onUploadSuccess() {
        // Rebind the Grid on successful upload
        $("#filesGrid").data("tGrid").rebind();
        //Delete Filelist
        $("ul.t-upload-files").remove();
    }
</script>

It works - but is it the right way? Or is there a official reset option?

Thanks Gerald 
Tags
Upload
Asked by
Gerald
Top achievements
Rank 1
Answers by
Gerald
Top achievements
Rank 1
Share this question
or