-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Following all the steps that have been included in the tutorial, I am getting a segmentation fault error when I try to use the storage() function.
This is my code :
using GoogleCloud
creds = JSONCredentials("./credentials.json")
session = GoogleSession(creds, ["devstorage.full_control"])
function upload_to_gcs(bucket_name::String, object_name::String, destination_path::String)
try
set_session!(storage, session)
file_contents = read(open(destination_path, "r"), String);
# Upload
storage(:Object, :insert, bucket_name; # Returns metadata about the object
name=object_name, # Object name is "image.jpg"
data=file_contents, # The data being stored on your project
)
@info "File uploaded successfully $destination_path"
catch err
@error "Something went wrong" exception=(err, catch_backtrace())
end
end
upload_to_gcs("folder", "file.jpg", "file.jpg")
Has anyone encountered this? if so what was the fix?
Metadata
Metadata
Assignees
Labels
No labels