|
Re: Uploading File chooser form to derby or computer [message #1850635 is a reply to message #1850389] |
Fri, 11 March 2022 08:55 |
|
Hi Reese
You can use Scout in many different deployment scenarios. But the must typical is to use Scout (Classic) as a client/server application where the Scout UI and the Scout server run on a central server, which connects to a database. In that scenario I'd recommend to store an uploaded file as BLOB in the database. Another approach is to store the uploaded files in a dedicated, central file storage (like S3, etc.) and only store a reference (URL) to that file in your database. However, if you're just starting to learn Scout I'd go with the BLOB approach because it's easier to implement, since you already have a DB connection and you don't have to deal with issues that might come up when you must access another external system/component/api.
Btw: when you use Scout's file chooser, the resource is always uploaded to the UI server automatically. From there you'd pass the resource as BinaryResource to the Scout server and store it in your database. I don't understand your question about the "new handler" anyway: typically you use the "new handler" to create a new, empty entity (like a new "person" in a CRM application), in the new PersonForm you could enter the persons name and upload a photo of that person, which you would store in the execStore method of the handler. Maybe the same form has a "modify handler" which would load the data (including the photo) from the server and display all data in the PersonForm when it is opened.
Cheers
André
Eclipse Scout Homepage | Documentation | GitHub
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03782 seconds