Tim Posted February 20, 2015 Posted February 20, 2015 We are building a wizard-style application which allows customers to submit orders. On the first page of the wizard the customer chooses files to be uploaded; the following pages gather various information about the order. The files selected on the first page should only be uploaded when the user clicks the Finish button on the final page of the wizard. This doesn't seem to be possible with the current TUniFileUpload control. Calling TUniFileUpload.Execute causes a modal Upload dialog to be displayed. After choosing a file, the user has two options: Upload and Cancel. Upload performs the upload immediately; Cancel clears the filename. We would like for the user to be able to close the modal dialog without either of these two things happening, i.e. the TUniFileUpload control should retain the filename selected by the user, so that the upload can be performed later in the OnClick event of the wizard's Finish button. The code would look something like the following: procedure TMainForm.FinishButtonClick(Sender: TObject); begin UniFileUpload1.PerformUpload(); end; I hope that makes sense This is possibly a duplicate of the following (somewhat older) feature request: http://forums.unigui.com/index.php?/topic/862-how-to-show-a-open-file-dialog/&do=findComment&comment=2325 For us at least being able to perform uploads in this fashion would be a really useful feature 1
chefdackel Posted February 20, 2015 Posted February 20, 2015 We are building a wizard-style application which allows customers to submit orders. On the first page of the wizard the customer chooses files to be uploaded; the following pages gather various information about the order. The files selected on the first page should only be uploaded when the user clicks the Finish button on the final page of the wizard. This doesn't seem to be possible with the current TUniFileUpload control. Calling TUniFileUpload.Execute causes a modal Upload dialog to be displayed. After choosing a file, the user has two options: Upload and Cancel. Upload performs the upload immediately; Cancel clears the filename. We would like for the user to be able to close the modal dialog without either of these two things happening, i.e. the TUniFileUpload control should retain the filename selected by the user, so that the upload can be performed later in the OnClick event of the wizard's Finish button. The code would look something like the following: procedure TMainForm.FinishButtonClick(Sender: TObject); begin UniFileUpload1.PerformUpload(); end; I hope that makes sense This is possibly a duplicate of the following (somewhat older) feature request: http://forums.unigui.com/index.php?/topic/862-how-to-show-a-open-file-dialog/&do=findComment&comment=2325 For us at least being able to perform uploads in this fashion would be a really useful feature you can change the code from this example, here you find the essential functions which we expect when uploading file(s): http://forums.unigui.com/index.php?/topic/4305-uniguifineuploader/ brfc
Tim Posted February 23, 2015 Author Posted February 23, 2015 Thanks for the pointer! It is not quite clear to me how one would adapt the code in the sample project under post #21050 (http://forums.unigui.com/index.php?/topic/4305-uniguifineuploader/&do=findComment&comment=21050) to initiate the upload from the OnClick of a TUniButton rather than clicking on the buttons in the file upload control itself. Presumably there is a javascript function I have to call somewhere? For our current project we probably will end up writing our own javascript code to allow the user to choose files and to perform uploads. I just thought it would be good to enter this feature request.
Oliver Morsch Posted February 23, 2015 Posted February 23, 2015 For our current project we probably will end up writing our own javascript code to allow the user to choose files and to perform uploads. Have you seen this? http://forums.unigui.com/index.php?/topic/2490-multiple-file-upload/
Tim Posted February 23, 2015 Author Posted February 23, 2015 Yes, that's probably what we will be basing our implementation on :)
Recommended Posts