@resolveio/server-lib 5.2.7 → 5.2.8
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/methods/aws.js +1 -1
- package/methods/pdf.js +5 -1
- package/package.json +1 -1
package/methods/aws.js
CHANGED
|
@@ -69,7 +69,7 @@ function loadAWSMethods(methodManager) {
|
|
|
69
69
|
if (fileName) {
|
|
70
70
|
var key_1 = 'uploads/' + Date.now() + '-' + (pdfCnt++) + '-' + fileName;
|
|
71
71
|
if (fileData.split(',')[0].split(':')[1].split(';')[0] === 'application/pdf') {
|
|
72
|
-
_this.callMethodInternal.call(_this, 'compressAndUploadPDF', key_1, fileData.replace('data:' + fileData.split(',')[0].split(':')[1].split(';')[0] + ';base64,', ''));
|
|
72
|
+
_this.callMethodInternal.call(_this, 'compressAndUploadPDF', fileName, key_1, fileData.replace('data:' + fileData.split(',')[0].split(':')[1].split(';')[0] + ';base64,', ''));
|
|
73
73
|
file_collection_1.Files.create({
|
|
74
74
|
_id: mongoose_1.Types.ObjectId().toHexString(), __v: 0, name: fileName, size: fileSize, key: key_1, order: fileOrder, type: fileType
|
|
75
75
|
}).then(function (resFile) {
|
package/methods/pdf.js
CHANGED
|
@@ -122,6 +122,9 @@ function loadPDFMethods(methodManager) {
|
|
|
122
122
|
compressAndUploadPDF: {
|
|
123
123
|
skipQueue: true,
|
|
124
124
|
check: new simpl_schema_1.default({
|
|
125
|
+
fileName: {
|
|
126
|
+
type: String
|
|
127
|
+
},
|
|
125
128
|
filePath: {
|
|
126
129
|
type: String
|
|
127
130
|
},
|
|
@@ -129,7 +132,7 @@ function loadPDFMethods(methodManager) {
|
|
|
129
132
|
type: String
|
|
130
133
|
}
|
|
131
134
|
}),
|
|
132
|
-
function: function (filePath, fileContent) {
|
|
135
|
+
function: function (fileName, filePath, fileContent) {
|
|
133
136
|
var _this = this;
|
|
134
137
|
return new Promise(function (resolve, reject) {
|
|
135
138
|
_this.callMethodInternal.call(_this, 'getCCProcessURL').then(function (resCC) {
|
|
@@ -144,6 +147,7 @@ function loadPDFMethods(methodManager) {
|
|
|
144
147
|
mode: 'compress',
|
|
145
148
|
input: 'base64',
|
|
146
149
|
file: fileContent,
|
|
150
|
+
filename: fileName,
|
|
147
151
|
outputformat: 'pdf',
|
|
148
152
|
wait: true,
|
|
149
153
|
output: {
|