You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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 :
Has anyone encountered this? if so what was the fix?
The text was updated successfully, but these errors were encountered: