@primestyleai/tryon 5.8.52 → 5.8.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react/index.js
CHANGED
|
@@ -13463,6 +13463,21 @@ function PrimeStyleTryonInner({
|
|
|
13463
13463
|
setPreviewUrl(null);
|
|
13464
13464
|
setBodyLandmarks(null);
|
|
13465
13465
|
}
|
|
13466
|
+
const profilePhoto = p.photoBase64;
|
|
13467
|
+
if (profilePhoto) {
|
|
13468
|
+
try {
|
|
13469
|
+
const dataUrl = profilePhoto.startsWith("data:") ? profilePhoto : `data:image/jpeg;base64,${profilePhoto}`;
|
|
13470
|
+
fetch(dataUrl).then((r) => r.blob()).then((blob) => {
|
|
13471
|
+
const file = new File([blob], "profile-photo.jpg", { type: blob.type || "image/jpeg" });
|
|
13472
|
+
setSelectedFile(file);
|
|
13473
|
+
selectedFileRef.current = file;
|
|
13474
|
+
if (previewUrl) URL.revokeObjectURL(previewUrl);
|
|
13475
|
+
setPreviewUrl(URL.createObjectURL(file));
|
|
13476
|
+
}).catch(() => {
|
|
13477
|
+
});
|
|
13478
|
+
} catch {
|
|
13479
|
+
}
|
|
13480
|
+
}
|
|
13466
13481
|
setView("size-result");
|
|
13467
13482
|
recommendForProduct({
|
|
13468
13483
|
productId: effectiveProductId,
|
|
@@ -22887,6 +22887,21 @@ function PrimeStyleTryonInner({
|
|
|
22887
22887
|
setPreviewUrl(null);
|
|
22888
22888
|
setBodyLandmarks(null);
|
|
22889
22889
|
}
|
|
22890
|
+
const profilePhoto = p2.photoBase64;
|
|
22891
|
+
if (profilePhoto) {
|
|
22892
|
+
try {
|
|
22893
|
+
const dataUrl = profilePhoto.startsWith("data:") ? profilePhoto : `data:image/jpeg;base64,${profilePhoto}`;
|
|
22894
|
+
fetch(dataUrl).then((r2) => r2.blob()).then((blob) => {
|
|
22895
|
+
const file = new File([blob], "profile-photo.jpg", { type: blob.type || "image/jpeg" });
|
|
22896
|
+
setSelectedFile(file);
|
|
22897
|
+
selectedFileRef.current = file;
|
|
22898
|
+
if (previewUrl) URL.revokeObjectURL(previewUrl);
|
|
22899
|
+
setPreviewUrl(URL.createObjectURL(file));
|
|
22900
|
+
}).catch(() => {
|
|
22901
|
+
});
|
|
22902
|
+
} catch {
|
|
22903
|
+
}
|
|
22904
|
+
}
|
|
22890
22905
|
setView("size-result");
|
|
22891
22906
|
recommendForProduct({
|
|
22892
22907
|
productId: effectiveProductId,
|