gd-sprest 7.5.1 → 7.5.3
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/build/helper/listForm.js
CHANGED
|
@@ -547,9 +547,9 @@ exports.ListForm = {
|
|
|
547
547
|
// Return a promise
|
|
548
548
|
return new Promise(function (resolve, reject) {
|
|
549
549
|
// Method to add an attachment
|
|
550
|
-
var addAttachment = function (name, data) {
|
|
550
|
+
var addAttachment = function (name, data, src) {
|
|
551
551
|
// Call the save event
|
|
552
|
-
onSave ? onSave({ name: name, data: data }) : null;
|
|
552
|
+
onSave ? onSave({ name: name, data: data, src: src }) : null;
|
|
553
553
|
// Get the list
|
|
554
554
|
info.list
|
|
555
555
|
// Get the item
|
|
@@ -583,7 +583,7 @@ exports.ListForm = {
|
|
|
583
583
|
// See if the info exists
|
|
584
584
|
if (info) {
|
|
585
585
|
// Add the attachment
|
|
586
|
-
addAttachment(srcFile.name, ev.target.result);
|
|
586
|
+
addAttachment(srcFile.name, ev.target.result, srcFile);
|
|
587
587
|
}
|
|
588
588
|
else {
|
|
589
589
|
// Remove the element
|
|
@@ -591,7 +591,8 @@ exports.ListForm = {
|
|
|
591
591
|
// Resolve the promise with the file information
|
|
592
592
|
resolve({
|
|
593
593
|
data: ev.target.result,
|
|
594
|
-
name: srcFile.name
|
|
594
|
+
name: srcFile.name,
|
|
595
|
+
src: srcFile
|
|
595
596
|
});
|
|
596
597
|
}
|
|
597
598
|
};
|
package/build/rest.js
CHANGED