Hi Guys
When the user drags a bunch of files into the upload widget, the files are being stored on the server and a logical file incl. a file version is being created
in the database backend assigning a unique ID to each uploaded file. I modified the widged in a way that the user can meanwhile edit some meta informations
like the name, the responsible person, whether a pdf view shall be generated and so on. This happens simultaneously while uploading on a "per file base". When all files are uploaded completely a button becomes active to commit all meta information. The problem is, that at this point (when the commit button is pressed after uploading all files), I need to know, which local "row" has which FileID on the server.
I didn't think this would be a problem in the first place as I realized, that a separate "upload" event and corresponding "save" request is being performed for each file (even when selecting multiple files at once). So I thought, I simply send the uid to the server by evt.data = {uid: file.uid) and the "save" handler on the server side returns a tuple (uid, FileID) which I can catch in the success event and assign the fileID to the matching DOM element containing the appropriate uid data attribute. What I didn't realize was, that it seems to be impossible to know for which file a "upload" event is being fired, so I don't know which uid to select as I always get the entire array of selected files.
Am I missing something here?
Best regards
When the user drags a bunch of files into the upload widget, the files are being stored on the server and a logical file incl. a file version is being created
in the database backend assigning a unique ID to each uploaded file. I modified the widged in a way that the user can meanwhile edit some meta informations
like the name, the responsible person, whether a pdf view shall be generated and so on. This happens simultaneously while uploading on a "per file base". When all files are uploaded completely a button becomes active to commit all meta information. The problem is, that at this point (when the commit button is pressed after uploading all files), I need to know, which local "row" has which FileID on the server.
I didn't think this would be a problem in the first place as I realized, that a separate "upload" event and corresponding "save" request is being performed for each file (even when selecting multiple files at once). So I thought, I simply send the uid to the server by evt.data = {uid: file.uid) and the "save" handler on the server side returns a tuple (uid, FileID) which I can catch in the success event and assign the fileID to the matching DOM element containing the appropriate uid data attribute. What I didn't realize was, that it seems to be impossible to know for which file a "upload" event is being fired, so I don't know which uid to select as I always get the entire array of selected files.
Am I missing something here?
Best regards