Create or edit your env. file to adjust Google Cloud Storage API.
- Upload files using Node JS and Express API to Google Cloud Storage
- List files in bucket
- Download file from bucket
- Upload buffer withour saving the file
- Multiple upload supported
GET /files
: http://localhost:3001/files
GET /downlad/:fileName
: http://localhost:3001/download/file
POST /upload
: http://localhost:3001/upload
POST /makePublic/:fileName
: http://localhost:3001/makePublic/file
{
"status": "success",
"totalFiles": 2,
"items": [
{
"name": "1572783488203-433953-972.jpg",
"size": "3462979",
"contentType": "image/png"
},
{
"name": "1572783627737-433953-2333.pdf",
"size": "5151811",
"contentType": "image/png"
}
}
{
"status": "success",
"fileName": "1572783488203-433953-972"
}
{
"status": "success",
"message": "2 file(s) uploaded and 0 file(s) not uploaded",
"uploadedFiles": [
{
"fileName": "1573180633948-file2.jpg",
"fileType": "image/jpeg",
"fileSize": 119971
},
{
"fileName": "1573180633941-file.jpg",
"fileType": "image/jpeg",
"fileSize": 606140
}
],
"errors": []
}
{
"status": "success",
"message": "1573180633948-file.jpg is now public access"
}