File Upload Example
Joined: 21 Oct 2018
Topic: File Upload Example
Posted: 07 Aug 2019 at 6:22pm
This is a file upload example that sends a selected file to the example sparkle fileupload example/Demo server included with TMSWeb. In the TMS Example a html example is given for the client side allowing the browser to manage the upload and progress. If you want to take control of the process the example below is a starting point.
Before you can use this example, you will have to enable CORS on the TMS uploadexample.
Personally, I never use Windows servers. I prefer Linux CentOS 7. So the TMS Example upload server won't work there. However this is a client side example so this makes it easy.
1. Open the example/demo fileupload from TMS and enable/add CORS to the Sparkle Server components.
2. Run the example server. Make note of the URL.
3. Create a new TMS Web application
4. Add: WebButton1: TWebButton, WebMemo1: TWebMemo, WebEdit1: TWebEdit, WebProgressBar1: TWebProgressBar, WebFilePicker1: TWebFilePicker, WebLabel1: TWebLabel,
6. add exampleFormControlFile1 to the elementID of the TWebFilePicker component
7. add exampleInputEmail1 to the elementID of the TWebEdit. Assign an email address to the text property.
5. Either use the unit below or create your own using it as an example:
There is quite a bit of room for improvements. If you want to enhance this or post your own file management changes please keep this thread alive as long as TMS allows.
For example, I use Linux stand-alone exe servers. No fuss with Apache/httpd. Maybe that example would be a good post here. Or better, TMS enhance it and post it as a Gem :-)
Hope this helps.
Joined: 20 Aug 2019
|Post Options Quote Reply Posted: 14 Nov 2019 at 10:48pm|
Frazor, I found your example very useful in figuring out the workings of XMLHttpReques and the WebFileUpload component (you used WebFilePicker). Thank you very much!
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum