Page 1 of 1
Google Bucket remote load settings
Posted: Thu Jul 18, 2024 10:53 pm
by crash
I am trying to setup load files to Google Bucket.. It looks like there are 3 places to set file settings, so I have 3 questions.
I have read all the help files and tried entering and testing all of them, although the file loads fine remotely and I can see the image, that file is not loading to my bucket.
In the advanced settings for remote file loading to google bucket.. This is what's stated..
Google Storage credential file (.json) Use with Google Cloud. Specifies the downloaded credential file (.json) on your PC.
Question : Must this be the file location on the drive eg: C:\Users\xx\files\xxxx-storage-xxx or the name of the .json file eg: xxxxx.json ?
Also in general options Upload Folder
Question: must we specify the google drive as in https://storage.cloud.google.com/xxxxx/ or must this just be /uploads ?
And then in edit tag.
Question: is this correct upload folder "/myfiles"
Thanks, appreciate any help
Re: Google Bucket remote load settings
Posted: Fri Jul 19, 2024 8:48 am
by MichaelG
- The "Google Storage credential file (.json)" setting should specify the location of the file
- You can specify the google storage as a global upload folder or field specific upload folder. Please read Notes in Upload folder.
Re: Google Bucket remote load settings
Posted: Sat Aug 31, 2024 5:45 am
by crash
Cannot get this right.. is this supposed to work when testing on local pc
I'm using latest version of ASPNM
Re: Google Bucket remote load settings
Posted: Sat Aug 31, 2024 12:09 pm
by MichaelG
Yes, it can work on local machine. Show your settings.
Re: Google Bucket remote load settings
Posted: Sun Sep 01, 2024 4:21 am
by crash
In General setting upload folder I have <https://storage.cloud.google.com/xxxxx/ >
When using the exact same code as in the ASNM help files <google.storage://my-bucket/> it just say failed to load. Copied direct from help file for testing.
I've tried using just my bucket name and also the subfolders, so I've gone back to <https://storage.cloud.google.com/xxxxx/ >
In the edit tag for Upload folder I have "foldername" I have tried this with empty, with / prefix and sufix.
In advanced settings I have the path to my json file on my PC
The files load fine on my server and I can see the image, but nothing load to the GDrive bucket. The drive bucket permissions are set to public and I can load files manually.
It does not load to my root bucket or the subfolders.
Thanks
Re: Google Bucket remote load settings
Posted: Sun Sep 01, 2024 8:01 am
by MichaelG
As explained:
The "Google Storage credential file (.json)" setting should specify the location of the file
You can specify the google storage as a global upload folder or field specific upload folder. Please read Notes in Upload folder.
From the help file, the path should be "google.storage://my-bucket/":
The path supports AWS S3, Azure Blob Storage and Google Cloud Storage, but you must specify your upload path in the following format: aws.s3://my-bucket/, azure.blob://my-container/, or google.storage://my-bucket/.
Re: Google Bucket remote load settings
Posted: Mon Sep 02, 2024 12:23 am
by crash
Both those instruction have been followed...
As indicated when you use google.storage://my-bucket/ it give pop up failed to create
It seems this must have Https in front... but that's not what the help file says
Thanks
Re: Google Bucket remote load settings
Posted: Mon Sep 02, 2024 10:14 am
by MichaelG
Show your detail settings.
If you are a registered user, you may want to send your project to the support email for quicker resolution.
Re: Google Bucket remote load settings
Posted: Thu Sep 05, 2024 6:08 am
by crash
Have done, support says will fix on next release
Re: Google Bucket remote load settings
Posted: Fri Sep 06, 2024 5:01 am
by crash
When using the option to use the field file upload, I get this error.
An unhandled exception occurred while processing the request.
FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
System.Convert.FromBase64CharPtr(Char* inputPtr, int inputLength)
Thanks
Re: Google Bucket remote load settings
Posted: Fri Sep 06, 2024 7:52 am
by MichaelG
Please make sure that you are using the latest version (ASP.NET Maker 24.8.0) and have updated to the latest template (Tools -> Update Template).
The generated appsettings.json should be base64 encoded:
"google.storage": {
"ConnectionString": "google.storage://cred=ewog...;bucket={0};",
"Url": "https://storage.googleapis.com/{1}/{2}"
},