Skip to content

Commit eeeaa98

Browse files
Kacper Polakjmdobry
authored andcommitted
Fix multer options (GoogleCloudPlatform#256)
* Fix multer options There is no "inMemory" options. * Update app.js
1 parent 73a0764 commit eeeaa98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

appengine/storage/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
const format = require('util').format;
2020
const express = require('express');
21+
const Multer = require('multer');
2122

2223
// By default, the client will authenticate using the service account file
2324
// specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
@@ -35,8 +36,8 @@ app.set('view engine', 'pug');
3536
// [START config]
3637
// Multer is required to process file uploads and make them available via
3738
// req.files.
38-
const multer = require('multer')({
39-
inMemory: true,
39+
const multer = Multer({
40+
storage: Multer.memoryStorage(),
4041
fileSize: 5 * 1024 * 1024 // no larger than 5mb, you can change as needed.
4142
});
4243

0 commit comments

Comments
 (0)