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.
@@ -77,6 +77,9 @@ export interface IListFormAttachmentInfo {
77
77
 
78
78
  /** The name of the file */
79
79
  name: string;
80
+
81
+ /** The source file */
82
+ src: any;
80
83
  }
81
84
 
82
85
  /**
@@ -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
  };
@@ -108,6 +108,6 @@ var waitForModernTheme = function () {
108
108
  // Reject the request
109
109
  reject();
110
110
  }
111
- }, 10);
111
+ }, 25);
112
112
  });
113
113
  };
package/build/rest.js CHANGED
@@ -8,7 +8,7 @@ var sptypes_1 = require("./sptypes");
8
8
  * SharePoint REST Library
9
9
  */
10
10
  exports.$REST = {
11
- __ver: 7.51,
11
+ __ver: 7.53,
12
12
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
13
13
  Apps: Lib.Apps,
14
14
  ContextInfo: Lib.ContextInfo,
@@ -2351,6 +2351,9 @@ declare module 'gd-sprest/helper/listForm' {
2351
2351
 
2352
2352
  /** The name of the file */
2353
2353
  name: string;
2354
+
2355
+ /** The source file */
2356
+ src: any;
2354
2357
  }
2355
2358
 
2356
2359
  /**