回答編集履歴
5
test
CHANGED
@@ -20,8 +20,7 @@
|
|
20
20
|
var answer = itemResponse.getResponse();
|
21
21
|
|
22
22
|
if (type === FormApp.ItemType.FILE_UPLOAD) {
|
23
|
-
if (!Array.isArray(answer)) answer = [answer];
|
24
|
-
attachImg = attachImg.
|
23
|
+
attachImg = [...attachImg, ...[...answer].map(e => DriveApp.getFileById(e).getBlob())];
|
25
24
|
}
|
26
25
|
|
27
26
|
// 回答項目
|
4
test
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
var question = itemResponse.getItem().getTitle();
|
20
20
|
var answer = itemResponse.getResponse();
|
21
21
|
|
22
|
-
if (type == FormApp.ItemType.FILE_UPLOAD) {
|
22
|
+
if (type === FormApp.ItemType.FILE_UPLOAD) {
|
23
23
|
if (!Array.isArray(answer)) answer = [answer];
|
24
24
|
attachImg = attachImg.concat(answer.map(e => DriveApp.getFileById(e).getBlob()));
|
25
25
|
}
|
3
修正
test
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
if (type == FormApp.ItemType.FILE_UPLOAD) {
|
23
23
|
if (!Array.isArray(answer)) answer = [answer];
|
24
|
-
attachImg = answer.map(e => DriveApp.getFileById(e).getBlob());
|
24
|
+
attachImg = attachImg.concat(answer.map(e => DriveApp.getFileById(e).getBlob()));
|
25
25
|
}
|
26
26
|
|
27
27
|
// 回答項目
|
2
複数ファイルに対応
test
CHANGED
@@ -20,8 +20,9 @@
|
|
20
20
|
var answer = itemResponse.getResponse();
|
21
21
|
|
22
22
|
if (type == FormApp.ItemType.FILE_UPLOAD) {
|
23
|
+
if (!Array.isArray(answer)) answer = [answer];
|
23
|
-
attachImg.p
|
24
|
+
attachImg = answer.map(e => DriveApp.getFileById(e).getBlob());
|
24
|
-
}
|
25
|
+
}
|
25
26
|
|
26
27
|
// 回答項目
|
27
28
|
body += "\n\n【" + question + "】\n\n";
|
1
test
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
下記ではいかがでしょうか。
|
1
2
|
```js
|
2
3
|
function sendForm(e) {
|
3
4
|
|