debug: verify WebP blob data integrity and URL lifecycle
This commit is contained in:
@@ -46,12 +46,17 @@ export function ConversionPreview({ job, onDownload }: ConversionPreviewProps) {
|
||||
// Create preview URL for result
|
||||
React.useEffect(() => {
|
||||
if (job.result && job.status === 'completed') {
|
||||
console.log('[Preview] Creating object URL for blob');
|
||||
const url = URL.createObjectURL(job.result);
|
||||
setPreviewUrl(url);
|
||||
console.log('[Preview] Object URL created:', url);
|
||||
|
||||
return () => {
|
||||
console.log('[Preview] Revoking object URL:', url);
|
||||
URL.revokeObjectURL(url);
|
||||
};
|
||||
} else {
|
||||
setPreviewUrl(null);
|
||||
}
|
||||
}, [job.result, job.status]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user