-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload folder to cloud storage #38
Upload folder to cloud storage #38
Conversation
…cted files from the folder path given to the function
… files to aws s3 bucket
…age and implemented a method on the struct to upload files to azure
…structs of cloud storage
Hey Thanks for the PR, |
screenshots should include the success message, since I am using the functions to upload the folders. Right? @uzaxirr |
Absolutely correct, I'll suggest to create a new file for demo purpose, import the functions and run them. The output should be displayed in screenshot |
…zure storage for every upload to improve scalability
@uzaxirr |
Hey can you update the branch as well? |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your valuable contribution. Here's a small suggestion
The log.Fatalln()
is similar to log.Println()
, but it also calls os.Exit(1)
after logging the message. This causes the program to terminate with a non-zero exit code, indicating that an error occurred.
So It is generally not recommended to call log.Fatalln()
or any other function that causes the program to terminate in functions other than main()
or init()
.
Thus you can replace all the occurrence of log.Fatalln()
with log.Errorln()
or any other error level log
constants/constants.go
Outdated
@@ -14,3 +14,7 @@ const S3_REGION = "us-east-1" | |||
const AWS_ENDPOINT = "http://localhost:4566" | |||
const PRESIGNED_URL_EXPIRATION = 60 * time.Minute | |||
const OUTPUT_FILE_PATH_PREFIX = "output" | |||
const GCP_BUCKET_NAME = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it const GCP_BUCKET_NAME = "zstream-bucket"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright
|
Yeah, Even i was investigating it, you can use |
…hofiya2003/zestream-server into upload_folder_to_cloud_storage
will make sure the tests passes by tomorrow. Thanks a ton for help @uzaxirr |
…nd of the process and when error occurs
@uzaxirr |
@Shofiya2003 anything left to add in this PR? |
no. @abhishekraj272 |
thanks @Shofiya2003 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Uploading to GCP
Uploading to AWS
Uploading to Azure
Closes #7