feat: Implement Media Matching Workflow
- Added matching wizard to MediaManager.html for linking Drive files to orphaned Shopify media on load. - Updated MediaService.ts to extract filenames from Shopify URLs for better matching. - Added linkDriveFileToShopifyMedia method to MediaService and exposed it via mediaHandlers and global.ts. - Improved UX in MediaManager with image transition clearing and button state feedback.
This commit is contained in:
@ -116,6 +116,17 @@ export function getMediaDiagnostics(sku: string) {
|
||||
}
|
||||
}
|
||||
|
||||
export function linkDriveFileToShopifyMedia(sku: string, driveId: string, shopifyId: string) {
|
||||
const config = new Config()
|
||||
const driveService = new GASDriveService()
|
||||
const shop = new Shop()
|
||||
const shopifyMediaService = new ShopifyMediaService(shop)
|
||||
const networkService = new GASNetworkService()
|
||||
const mediaService = new MediaService(driveService, shopifyMediaService, networkService, config)
|
||||
|
||||
return mediaService.linkDriveFileToShopifyMedia(sku, driveId, shopifyId)
|
||||
}
|
||||
|
||||
export function saveFileToDrive(sku: string, filename: string, mimeType: string, base64Data: string) {
|
||||
const config = new Config()
|
||||
const driveService = new GASDriveService()
|
||||
|
||||
Reference in New Issue
Block a user