hootchi Posted October 2, 2014 Share Posted October 2, 2014 Hi all UniGuys, i would like to get the original filename of file on TUniFileUpload, but I do not know how. There is only one event OnComplete returning TFileStream, but filename of this stream is already renamed to random hash. Where I can find original filename? Thanks H. Quote Link to comment Share on other sites More sharing options...
Marlon Nardi Posted October 2, 2014 Share Posted October 2, 2014 Event -> FileUploadCompleted ExtractFileName(FileUpload.FileName) 1 Quote Link to comment Share on other sites More sharing options...
hootchi Posted October 2, 2014 Author Share Posted October 2, 2014 Thanks, this property is visible only in script and I haven't seen it Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 2, 2014 Administrators Share Posted October 2, 2014 Script? Quote Link to comment Share on other sites More sharing options...
ZigZig Posted October 2, 2014 Share Posted October 2, 2014 Hi all UniGuys, Quote Link to comment Share on other sites More sharing options...
hootchi Posted October 2, 2014 Author Share Posted October 2, 2014 Script? I mean, this property is not published in ObjectInspector, and so I have not seen it. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 2, 2014 Administrators Share Posted October 2, 2014 It is a public variable Quote Link to comment Share on other sites More sharing options...
asapltda Posted November 13, 2015 Share Posted November 13, 2015 Event -> FileUploadCompleted ExtractFileName(FileUpload.FileName) Event -> FileUploadCompleted ExtractFileName(FileUpload.FileName) Hello , How can I rename the file to disk , or copy it to a database? Thank you Quote Link to comment Share on other sites More sharing options...
asapltda Posted November 13, 2015 Share Posted November 13, 2015 Hello , How can I rename the file to disk , or copy it to a database?Thank you Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 13, 2015 Administrators Share Posted November 13, 2015 procedure TMainForm.UniFileUpload1Completed(Sender: TObject; AStream: TFileStream); begin end; You can use AStream for any purpose. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.