From 29d9d498bf5c475ccef7416d392cf7585d61a957 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 11 Oct 2022 11:46:17 -0700 Subject: [PATCH] Use aws.impress-asset-images.openneo.net We're gonna update impress-asset-images.openneo.net to perform redirects and stuff, so Classic DTI can start using the same images that DTI 2020 does. That should enable us to stop relying on AWS for images, which is important because the new modeling script breaks that anyway :p but this will also let us turn off the image converters that run in the background all the time, and I'm excited for that too! --- pages/api/outfitImage.js | 2 +- src/server/types/AppearanceLayer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/api/outfitImage.js b/pages/api/outfitImage.js index 4ce1d351..78e1c074 100644 --- a/pages/api/outfitImage.js +++ b/pages/api/outfitImage.js @@ -51,7 +51,7 @@ import getVisibleLayers, { // of the following patterns: const VALID_LAYER_URLS = [ // Some layers are converted from SWF to PNG by Classic DTI, living on S3. - /^https:\/\/(impress-asset-images\.openneo\.net|impress-asset-images\.s3\.amazonaws\.com)\/(biology|object)\/[0-9]{3}\/[0-9]{3}\/[0-9]{3}\/[0-9]+\/(150x150|300x300|600x600)\.png(\?[a-zA-Z0-9_-]+)?$/, + /^https:\/\/(aws.impress-asset-images\.openneo\.net|impress-asset-images\.openneo\.net|impress-asset-images\.s3\.amazonaws\.com)\/(biology|object)\/[0-9]{3}\/[0-9]{3}\/[0-9]{3}\/[0-9]+\/(150x150|300x300|600x600)\.png(\?[a-zA-Z0-9_-]+)?$/, // Some layers are converted to PNG or SVG by Neopets themselves, extracted // from the manifest file. diff --git a/src/server/types/AppearanceLayer.js b/src/server/types/AppearanceLayer.js index 9f041b6b..7379018f 100644 --- a/src/server/types/AppearanceLayer.js +++ b/src/server/types/AppearanceLayer.js @@ -234,7 +234,7 @@ const resolvers = { const time = Number(new Date(layer.convertedAt)); return ( - `https://impress-asset-images.openneo.net/${layer.type}` + + `https://aws.impress-asset-images.openneo.net/${layer.type}` + `/${rid1}/${rid2}/${rid3}/${rid}/${sizeNum}x${sizeNum}.png?v2-${time}` ); },