@pnkx-lib/ui 1.9.464 → 1.9.466
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.
|
@@ -11528,8 +11528,9 @@ function GenericUploadModal({
|
|
|
11528
11528
|
return false;
|
|
11529
11529
|
},
|
|
11530
11530
|
onPreview: (file) => {
|
|
11531
|
+
const fileUrl = file.url || (file.originFileObj ? URL.createObjectURL(file.originFileObj) : "");
|
|
11531
11532
|
const link = document.createElement("a");
|
|
11532
|
-
link.href =
|
|
11533
|
+
link.href = fileUrl;
|
|
11533
11534
|
link.download = file.name || "download";
|
|
11534
11535
|
link.target = "_blank";
|
|
11535
11536
|
document.body.appendChild(link);
|
package/es/ui/UploadComponent.js
CHANGED
|
@@ -41,7 +41,7 @@ const UploadComponent = ({
|
|
|
41
41
|
customRequest: async (options) => {
|
|
42
42
|
const { file, onSuccess, onError } = options;
|
|
43
43
|
try {
|
|
44
|
-
|
|
44
|
+
customRequest?.(file, field.onChange);
|
|
45
45
|
onSuccess?.({}, file);
|
|
46
46
|
} catch (err) {
|
|
47
47
|
onError?.(err);
|