Skip to content

Increase size limit for JSON uploads to storage #8356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Fix bug in Auth emulator where accounts:lookup is case-sensitive for emails (#8344)
- Fixed an issue where the Storage emulator applied too low of a limit for files uploaded with Content-Type: application/json. (#8355)
1 change: 1 addition & 0 deletions src/emulator/storage/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import { SourceFile } from "./rules/types";

/**
* @param defaultProjectId

Check warning on line 13 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc @param "defaultProjectId" description
* @param emulator

Check warning on line 14 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc @param "emulator" description
*/
export function createApp(
defaultProjectId: string,
Expand Down Expand Up @@ -64,12 +64,13 @@
app.use(
express.json({
type: ["application/json"],
limit: "130mb",
}),
);

app.post("/internal/export", async (req, res) => {

Check warning on line 71 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Promise returned in function argument where a void return was expected
const initiatedBy: string = req.body.initiatedBy || "unknown";

Check warning on line 72 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value

Check warning on line 72 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .initiatedBy on an `any` value
const path: string = req.body.path;

Check warning on line 73 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value

Check warning on line 73 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .path on an `any` value
if (!path) {
res.status(400).send("Export request body must include 'path'.");
return;
Expand Down Expand Up @@ -106,8 +107,8 @@
* }
* ```
*/
app.put("/internal/setRules", async (req, res) => {

Check warning on line 110 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Promise returned in function argument where a void return was expected
const rulesRaw = req.body.rules;

Check warning on line 111 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value

Check warning on line 111 in src/emulator/storage/server.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .rules on an `any` value
if (!(rulesRaw && Array.isArray(rulesRaw.files) && rulesRaw.files.length > 0)) {
res.status(400).json({
message: "Request body must include 'rules.files' array",
Expand Down
Loading