-
Notifications
You must be signed in to change notification settings - Fork 242
Closed
Description
I have a frontend page, let's say it contains a gallery. Every image in the gallery is a file that I have in my server (not in the public directory), so I can use .fetch(), to request them from Oak as blobs and turn them into images.
But If I have many images, how should I request these from the browser? With multiple fetch's in the client side?
On the server, I suppose I could write an oak route like this:
Router.get(["/images/:image_ID"], async (context) => {
let myBlob = getImageBlobFromID(context.params.image_ID)
context.response.body = myBlob;
}); ...and call it many times. Theoretically and practically speaking, is that how I should do it?
(and let's assume I have not created an automatic spritesheet with all the images of that gallery)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels