Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions appengine/storage/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

const format = require('util').format;
const express = require('express');
const Multer = require('multer');

// By default, the client will authenticate using the service account file
// specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
Expand All @@ -35,8 +36,8 @@ app.set('view engine', 'pug');
// [START config]
// Multer is required to process file uploads and make them available via
// req.files.
const multer = require('multer')({
inMemory: true,
const multer = Multer({
storage: Multer.MemoryStorage,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From multer's readme it seems like this should be storage: Multer.memoryStorage() right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's. Sorry my bad. Changed

fileSize: 5 * 1024 * 1024 // no larger than 5mb, you can change as needed.
});

Expand Down