Comments (2)
fix it:
function object2hrefvirt(bucket, key) {
var enckey = key.split('/').map(function (x) {
return encodeURIComponent(x);
}).join('/');
if (AWS.config.region === "us-east-1") {
return document.location.protocol + '//' + bucket + '.s3.amazonaws.com/' + enckey;
}
** fix this else if (AWS.config.region === "cn-north-1") {
return document.location.protocol + '//' + bucket + '.s3.' + AWS.config.region + '.amazonaws.com.cn/' + enckey; **
} else {
return document.location.protocol + '//' + bucket + '.s3-' + AWS.config.region + '.amazonaws.com/' + enckey;
}
}
from aws-js-s3-explorer.
I noticed the same issue with the af-south-1 region. This fix seems to work.
I'll copy the change above, since the formatting is broken. s3-
is changed to s3.
function object2hrefvirt(bucket, key) {
var enckey = key.split('/').map(function(x) { return encodeURIComponent(x); }).join('/');
if (AWS.config.region === "us-east-1") {
return document.location.protocol + '//' + bucket + '.s3.amazonaws.com/' + enckey;
} else {
return document.location.protocol + '//' + bucket + '.s3.' + AWS.config.region + '.amazonaws.com/' + enckey;
}
}
function object2hrefpath(bucket, key) {
var enckey = key.split('/').map(function(x) { return encodeURIComponent(x); }).join('/');
if (AWS.config.region === "us-east-1") {
return document.location.protocol + "//s3.amazonaws.com/" + bucket + "/" + enckey;
} else {
return document.location.protocol + "//s3.' + AWS.config.region + '.amazonaws.com/" + bucket + "/" + enckey;
}
}
I would submit a PR, but I spotted this:
Lines 688 to 690 in 4de1fd0
and I don't know enough about AWS URLs to be sure of all the possibilities. s3-eu-central-1
works, but s3-af-south-1
does not.
(The URLs don't seem to be consistent between regions, e.g. https://gbif-open-data-eu-central-1.s3-eu-central-1.amazonaws.com/occurrence/2021-04-13/citation.txt and https://gbif-open-data-eu-central-1.s3.eu-central-1.amazonaws.com/occurrence/2021-04-13/citation.txt both work, with either s3-eu-central-1
or s3.eu-central-1
, but https://gbif-open-data-af-south-1.s3-af-south-1.amazonaws.com/occurrence/2021-04-13/citation.txt doesn't work; https://gbif-open-data-af-south-1.s3.af-south-1.amazonaws.com/occurrence/2021-04-13/citation.txt does).
from aws-js-s3-explorer.
Related Issues (20)
- cors policy in README doesn't work HOT 3
- README.md CORS config typo (v2-alpha) HOT 2
- Unable to open explorer with cloud front HOT 1
- Question: Hiding specific folders from view. HOT 1
- Feature Request - Add AD login HOT 2
- Network Failure
- Question: is there a way to specify service endpoint (endpoint URL)? HOT 5
- S3 local connection HOT 2
- AWS SSO/SAML Integration HOT 3
- Question: promptForBucketInput HOT 5
- Cors Issue
- Unable to list S3 object HOT 3
- django app based on your project HOT 2
- xss injection HOT 2
- Dependencies out of date
- Error accessing S3 bucket test-browse. Error: NetworkingError: Network Failure HOT 3
- Support storage backends other than S3 HOT 1
- Upload Speed HOT 3
- Method for CNAME creation HOT 1
- JSON CORS config in README HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-js-s3-explorer.