Hello i m a student in computer engineering, so i would like to ask so many things about this, but the most i want to know is : can we get all kind of files or only images ? and how could we get and send the files name and url into a database ?
Ps : im using a node+express+mysql API
Hello! The file url will be
MINIO_ENDPOINT:MINIO_PORT/BUCKET_NAME/FILE_NAME
Yes, you can save any file, not just images.
You can save the file’s url and the name to your db. However you need to be sure that file’s been uploaded successfully. In order to do that, save url and name of the file inside of the putObject method’s callback, after checking for the error ofc.
Hello!
It’s hard to tell just by looking at it but what’s with the dollar sign? Did you try to create a template literal? And it’ll be better gor you to check if any errors occurred.
Btw I didn’t use the presignedPutObject method on tutorial, have you read the docs? 😄
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello i m a student in computer engineering, so i would like to ask so many things about this, but the most i want to know is : can we get all kind of files or only images ? and how could we get and send the files name and url into a database ?
Ps : im using a node+express+mysql API
Hello! The file url will be
MINIO_ENDPOINT:MINIO_PORT/BUCKET_NAME/FILE_NAME
Yes, you can save any file, not just images.
You can save the file’s url and the name to your db. However you need to be sure that file’s been uploaded successfully. In order to do that, save url and name of the file inside of the putObject method’s callback, after checking for the error ofc.
Hello it's me again :)
What am i doing wrong on my post method ?
Hello!
It’s hard to tell just by looking at it but what’s with the dollar sign? Did you try to create a template literal? And it’ll be better gor you to check if any errors occurred.
Btw I didn’t use the presignedPutObject method on tutorial, have you read the docs? 😄