Can you add a region field to the provider when selecting custom service?
This part of code in s3.js is not “custom provider friendly”.
I had to hardcode the region(fr-par) as it is set by defect to us-east-01 or something similar and the indexOf only handles endpoints which contain ‘amazonaws’ and not custom endpoints.
I’ve been working with backblaze and scaleway endpoints.
Does it give an error when you use s3.fr-par.backblazeb2.com as endpoint. From what I have tried only Amazon was returning an error when the region option was not set and the other services worked without setting it and setting an endpoint was enough.
Nonetheless I get a “Bad Request” when sending an OPTION request to the provider and a CORS error due to the X-Amz-Credential parameter being sent with “us-east-01” region instead of the region the provider expects.
Ah ok, then we will indeed need a region option that can be set. I can’t parse it out of the Endpoind since I don’t know how the url is build up, it can be different per provider.
Yes, same is with Amazon, they check the parameter and you get an error if the region is not correct. That’s why it has the specific code to detect amazon and extract the region from the endpoint.
In backblaze I got an error being the endpoint correct…
It is something related with parameters sent by signed upload server connect… let me check it if I will find it again
Don’t remember I m not in the office… could be… But I remember an article I read on their website about something concerning the upload… maybe I’m wrong…
[Edit]
Yes I tested again the page… CORS error !! you are right…
Hey @JonL. Are you still using this custom code? the s3.js file you mentioned, is that the file in the aws-sdk node_modules folder on Wappler’s own s3.js file?
I certainly confirmed that the custom s3 connection does work for Google, but only for some of the actions/steps.
It works fine to list the buckets and upload objects files etc, but it can’t create a bucket because of the region issue mentioned here.
It also can’t list the objects with a bucket but that’s doe to the listObjectv2 compatibility issue with Google that @patrick mentioned in my other post.