Affects Version/s: 10.10
Component/s: Web UI
There might be an issue with the UI implementation also sending the wrong dc:title (that is used to generate the file name) in a race situation that could explain why we end up with the duplicate paths on the server:
Check the logic in element ( and the attached screenshots)
- when we upload multiple files, they are stored in the variable : "this.localFiles"
- when we click through the files, the selected file properties (including the dc:title) are stored in the "localFile" array in the method storeFile: function(index)
- => in the code above you can see that the title is being fetched from the this.document.properties['dc:title']), so the this.document object that is supposed to reflect the current document being selected in the upload form
- however, this.document is actually set in an asynchronous call _updateDocument
=> so that means that even if I call newDocument with the right properties, they are bound on the this.document later in an async way when the server has returned from the get call=> we can potentially set the wrong title on the document if the user clicks fast between many documents.
I could recreate this by clicking on the next file and delaying the server side response on newDocument with few seconds for the previous one ( breakpoint in EmptyDocumentAdapter).