Add captions for each image

Nov 26, 2008 at 6:24 AM
    I have managed to make my own adapter to upload the image to a server and save it's path to the database. What I can't do is to allow the user to add captions for each image (if user selects more than 1 file) and save the captions to the DB. How can I achieve this? It is easier for a single file upload because I can use FileUploader1.State.Add("Key1","Value1"), but how can I do that on multiple files upload? Thanks!
Nov 26, 2008 at 5:01 PM
With the latest updates that can be done. You have to override JsFunc_GenerateFileRow. It's default content is

Flajaxian.generateFileRow = function(uploader, row, container) {
    if (!container) { return; }
    var div = Flajaxian.createElement("div", uploader.get_id()+"_FileBoxFileListRow_", Flajaxian.rowClassByState(row.state));
    row.ui = div;

    var closeImg = Flajaxian.createElement("img", uploader.get_id()+"_FileBoxFileListRowCloseBtn_", "Flajaxian_FileBoxFileListRowCloseBtn");
    row.btnUI = closeImg;
    closeImg.src = uploader.get_closeBtnUrl();

    var span = Flajaxian.createElement("span", uploader.get_id()+"_FileBoxFileListRowText_", "Flajaxian_FileBoxFileListRowText");
    row.textUI = span;
    Flajaxian.setElementText(span, Flajaxian.ensureWordLength(, 22));


you also have to pass a processor to (client-side)
where Func1 one will associate the values for each text box

function Func1(uploader, array){
    for(var i = 0; i < {YOUR TEXT BOXES}.length; i++){
        array.push({key:{YOUR REQUEST KEY}, value:{TEXT}, fileID:{FILE ID}});

If you can wait  2-3  weeks we can implement adapter for that

Nov 27, 2008 at 1:01 AM
Thank you very much for your reply. I followed the first set of code and managed to show a textbox in each file row. But where do I place the code yourFlajaxian.addUploadPreProcessor(Func1)?  And is "yourFlajaxian"  the ID of the control? I also have no idea on how to access or count my textboxes in the function "Func1". I'm sorry as I have a limited knowledge in javascript.

I think creating an adapter would be very handy. Thanks again! 

Nov 27, 2008 at 2:29 AM
yourFlajaxian is <%#Flajaxian1.ClientID%>

... but sorry I won't have time to write it all here for you. We may write an adapter for that but it will take a couple of weeks because this is no my main job and we already have quite a few requests.
Nov 28, 2008 at 3:14 AM
It's alright, I guess I'll just have to wait for the adapter. Thanks a lot!
Feb 27, 2009 at 1:46 PM

Hi there,

Can you please send me the code for how you get that textbox in FileListBox?

I am also trying to do the same thing.