You are not logged in.
Pages: 1
Hi AB the MVC Views can render .static data and views.
I have the Problem that we have to display thousands of dynamic Pictures in our View.
The Images are stored in the database.
Now i like to dynamically display images on my Client Site.
My Idea is to enhance the MVC View Renderer (InternalRunOnRestServer) with a kind of dynamic contents rendering.
For Example if URL start with .dynamic (like your .static) followed by some Text .dynamic/Pic1 then this Pic1 should be passed to a MVC function which can Return my Image Data.
The Other way would be to store the requested Images in .static/tmp subfolder but than i would have to care about garbage collection.
As other Option i have to check if the Client has the right to view the picture before sending it.
What do you think ?
Rad Studio 12.1 Santorini
Offline
You can use TSQLRestServer.ServiceMethodRegister and get full control on processing request and response.
For example, all requests to /root/images/... will be passed to ImagesPage method:
procedure TMyApp.Start(aRestModel: TSQLRest);
begin
...
TSQLRestServer(aRestModel).ServiceMethodRegister('images', ImagesPage, True);
end;
Offline
ty i'll try
Rad Studio 12.1 Santorini
Offline
tyvm it works perfekt now...
Rad Studio 12.1 Santorini
Offline
Pages: 1