A
A
Artem Rogozin2019-12-23 23:22:36
go
Artem Rogozin, 2019-12-23 23:22:36

How to pass image pool to front in go?

How to send multiple images to the frontend in go? The option with json, in which there will be a field with an image encoded in base64, is discarded, because pictures weigh quite a lot, on average 3-4 mb, and while encoding is happening on the back, the server crashes with a timeout. It seems like I heard that it is possible through multipart, but I didn’t really understand how to transfer many images at once, and not just one.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav, 2019-12-24
@ghostiam

As index0h said , pass links.
Minio can generate direct links with parameters (for example, link lifetime)
Look at the documentation, PresignedGetObject() function, there is an example:
https://docs.min.io/docs/golang-client-api-referen...

I
index0h, 2019-12-24
@index0h

Pass the link to the front, let him download it, not a small one. For download control, read about nginx x-accel-redirect.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question