I have uploaded some images and videos in the minio server (https://play.minio.io:9000) from my android client. Now I have been able to download the uploaded content from that folder. What I can see that the content is not the actual image/video, instead it shows me some encrypted format. My question is how can I get the actual image/video that I have uploaded. Is there any such tool or anything else I could do?
Any help would be appreciated..
Thanks in advance.
Here is my solution for Image preview in minio
# set alias
mc alias set myminio HOST:9000 MINIO_CLIENT MINIO_SECRET
# create bucket
mc mb myminio/image
# set policy for the bucket
mc policy set download myminio/image
My uploader function
const fs = require('fs');
const file = './cat.jpg';
const fileStream = fs.createReadStream(file);
const metadata = {
'Content-type': 'image',
};
const upload = async () => {
const etag = await minioClient.putObject(
'image',
'cat.jpg',
fileStream,
metadata // this metadata in important to preview image from browser instead of download
);
console.log({ etag });
};
Now navigate to http://localhost:9000/image/cat.jpg
You will see your cat image from direct link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With