feature/api-development #1
|
|
@ -86,9 +86,9 @@ liveRouter.get(
|
||||||
const storageService = await StorageFactory.getInstance();
|
const storageService = await StorageFactory.getInstance();
|
||||||
|
|
||||||
// Parse storage key to get components
|
// Parse storage key to get components
|
||||||
// Format: orgId/projectId/category/year-month/filename.ext
|
// Format: orgId/projectId/category/filename.ext
|
||||||
const keyParts = image.storageKey.split('/');
|
const keyParts = image.storageKey.split('/');
|
||||||
if (keyParts.length < 5) {
|
if (keyParts.length < 4) {
|
||||||
throw new Error('Invalid storage key format');
|
throw new Error('Invalid storage key format');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,8 +153,9 @@ liveRouter.get(
|
||||||
// Download newly generated image
|
// Download newly generated image
|
||||||
const storageService = await StorageFactory.getInstance();
|
const storageService = await StorageFactory.getInstance();
|
||||||
|
|
||||||
|
// Format: orgId/projectId/category/filename.ext
|
||||||
const keyParts = generation.outputImage.storageKey.split('/');
|
const keyParts = generation.outputImage.storageKey.split('/');
|
||||||
if (keyParts.length < 5) {
|
if (keyParts.length < 4) {
|
||||||
throw new Error('Invalid storage key format');
|
throw new Error('Invalid storage key format');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue