use new s3 bucket behind cloudflare cdn
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import utils from '../utils';
|
||||
|
||||
AFRAME.registerComponent('menu-selected-challenge-image', {
|
||||
schema: {
|
||||
selectedChallengeId: {type: 'string'}
|
||||
@@ -8,6 +10,6 @@ AFRAME.registerComponent('menu-selected-challenge-image', {
|
||||
if (!this.data.selectedChallengeId) { return; }
|
||||
el.setAttribute(
|
||||
'material', 'src',
|
||||
`https://s3-us-west-2.amazonaws.com/supersaber/${this.data.selectedChallengeId}-image.jpg`);
|
||||
utils.getS3FileUrl(this.data.selectedChallengeId, 'image.jpg'));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import utils from '../utils';
|
||||
|
||||
var CANVAS_HEIGHT = 512; // Power-of-two.
|
||||
var HEIGHT = 64;
|
||||
var NUM_PER_PAGE = 6;
|
||||
@@ -49,7 +51,7 @@ AFRAME.registerComponent('search-thumbnail-atlas', {
|
||||
for (let i = 0; i < results.length; i++) {
|
||||
let img = this.images[i] = this.images[i] || document.createElement('img');
|
||||
img.crossOrigin = 'anonymous';
|
||||
img.src = `https://s3-us-west-2.amazonaws.com/supersaber/${results[i].id}-image.jpg`;
|
||||
img.src = utils.getS3FileUrl(results[i].id, 'image.jpg');
|
||||
if (img.complete) {
|
||||
this.draw(img, i);
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var BASE_URL = 'https://s3-us-west-2.amazonaws.com/supersaber';
|
||||
const BASE_URL = 'https://saber.supermedium.com';
|
||||
|
||||
function getS3FileUrl (id, name) {
|
||||
return `${BASE_URL}/${id}-${name}`;
|
||||
|
||||
Reference in New Issue
Block a user