fix: proxy Meshy GLB download through backend to resolve CORS blocking, remove polling console logs
Build and Deploy / build-and-push (push) Successful in 31s
Build and Deploy / build-and-push (push) Successful in 31s
This commit is contained in:
@@ -217,13 +217,12 @@ export const ImageTo3DModal: React.FC<ImageTo3DModalProps> = ({ isOpen, onClose,
|
|||||||
|
|
||||||
const status = (pollData.status || '').toUpperCase();
|
const status = (pollData.status || '').toUpperCase();
|
||||||
const progress = pollData.progress || 0;
|
const progress = pollData.progress || 0;
|
||||||
console.log("Meshy poll:", pollData); // Debug log
|
|
||||||
setProgressMessage(`Generating... ${progress}%`);
|
setProgressMessage(`Generating... ${progress}%`);
|
||||||
|
|
||||||
if (status === 'SUCCEEDED') {
|
if (status === 'SUCCEEDED') {
|
||||||
const modelUrl = pollData.model_urls?.glb;
|
const modelUrl = pollData.model_urls?.glb;
|
||||||
if (!modelUrl) throw new Error("Meshy API: Model URL not found in result.");
|
if (!modelUrl) throw new Error("Meshy API: Model URL not found in result.");
|
||||||
setGeneratedModelUrl(modelUrl);
|
setGeneratedModelUrl(`/api/proxy/glb?url=${encodeURIComponent(modelUrl)}`);
|
||||||
setProgressMessage("Done!");
|
setProgressMessage("Done!");
|
||||||
isDone = true;
|
isDone = true;
|
||||||
deductCredit();
|
deductCredit();
|
||||||
|
|||||||
Reference in New Issue
Block a user