@oneblink/sdk-core 8.8.1-beta.3 → 8.9.0-beta.1

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.
@@ -13,3 +13,7 @@
13
13
  * @returns
14
14
  */
15
15
  export declare function getContentDisposition(filename: string): string;
16
+ /**
17
+ * A default list of files types (extensions) that is allowed.
18
+ */
19
+ export declare const restrictedFileTypes: string[];
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.restrictedFileTypes = void 0;
3
4
  exports.getContentDisposition = getContentDisposition;
4
5
  /**
5
6
  * Attempts to get the content disposition for the header by compiling a string
@@ -18,4 +19,26 @@ exports.getContentDisposition = getContentDisposition;
18
19
  function getContentDisposition(filename) {
19
20
  return `attachment; filename*=UTF-8''${encodeURIComponent(filename)}`;
20
21
  }
22
+ /**
23
+ * A default list of files types (extensions) that is allowed.
24
+ */
25
+ exports.restrictedFileTypes = [
26
+ 'avif',
27
+ 'apng',
28
+ 'png',
29
+ 'jpg',
30
+ 'jpeg',
31
+ 'jfif',
32
+ 'pjpeg',
33
+ 'pjp',
34
+ 'gif',
35
+ 'pdf',
36
+ 'heic',
37
+ 'heif',
38
+ 'doc',
39
+ 'docx',
40
+ 'xls',
41
+ 'xlsx',
42
+ 'csv',
43
+ ];
21
44
  //# sourceMappingURL=fileUploadService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fileUploadService.js","sourceRoot":"","sources":["../src/fileUploadService.ts"],"names":[],"mappings":";;AAcA,sDAEC;AAhBD;;;;;;;;;;;;;GAaG;AACH,SAAgB,qBAAqB,CAAC,QAAgB;IACpD,OAAO,gCAAgC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAA;AACvE,CAAC","sourcesContent":["/**\n * Attempts to get the content disposition for the header by compiling a string\n * of UTF-8 formatting based on the file name.\n *\n * #### Example\n *\n * ```js\n * const contentDisposition =\n * fileUploadService.getContentDisposition(fileName)\n * ```\n *\n * @param filename The name of the file being uploaded\n * @returns\n */\nexport function getContentDisposition(filename: string): string {\n return `attachment; filename*=UTF-8''${encodeURIComponent(filename)}`\n}\n"]}
1
+ {"version":3,"file":"fileUploadService.js","sourceRoot":"","sources":["../src/fileUploadService.ts"],"names":[],"mappings":";;;AAcA,sDAEC;AAhBD;;;;;;;;;;;;;GAaG;AACH,SAAgB,qBAAqB,CAAC,QAAgB;IACpD,OAAO,gCAAgC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAA;AACvE,CAAC;AAED;;GAEG;AACU,QAAA,mBAAmB,GAAG;IACjC,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;CACN,CAAA","sourcesContent":["/**\n * Attempts to get the content disposition for the header by compiling a string\n * of UTF-8 formatting based on the file name.\n *\n * #### Example\n *\n * ```js\n * const contentDisposition =\n * fileUploadService.getContentDisposition(fileName)\n * ```\n *\n * @param filename The name of the file being uploaded\n * @returns\n */\nexport function getContentDisposition(filename: string): string {\n return `attachment; filename*=UTF-8''${encodeURIComponent(filename)}`\n}\n\n/**\n * A default list of files types (extensions) that is allowed.\n */\nexport const restrictedFileTypes = [\n 'avif',\n 'apng',\n 'png',\n 'jpg',\n 'jpeg',\n 'jfif',\n 'pjpeg',\n 'pjp',\n 'gif',\n 'pdf',\n 'heic',\n 'heif',\n 'doc',\n 'docx',\n 'xls',\n 'xlsx',\n 'csv',\n]\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oneblink/sdk-core",
3
3
  "description": "OneBlink SDK for JavaScript (works in Browsers and NodeJS)",
4
- "version": "8.8.1-beta.3",
4
+ "version": "8.9.0-beta.1",
5
5
  "author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/oneblink/sdk-core-js/issues"