fix: Add Portugese, Brazil to language options (#2164)

* Add Portugese, Brazil to language options

* Upgrade date-fns package

Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
Saumya Pandey
2021-06-10 06:12:14 +05:30
committed by GitHub
parent a99f6bed42
commit a6d4d4ea36
27 changed files with 85 additions and 70 deletions

View File

@ -1,5 +1,5 @@
// @flow
import format from "date-fns/format";
import { format } from "date-fns";
import Router from "koa-router";
import { v4 as uuidv4 } from "uuid";
import { NotFoundError } from "../errors";
@ -39,7 +39,7 @@ router.post("attachments.create", auth(), async (ctx) => {
const bucket = acl === "public-read" ? "public" : "uploads";
const key = `${bucket}/${user.id}/${s3Key}/${name}`;
const credential = makeCredential();
const longDate = format(new Date(), "YYYYMMDDTHHmmss\\Z");
const longDate = format(new Date(), "yyyyMMdd'T'HHmmss'Z'");
const policy = makePolicy(credential, longDate, acl, contentType);
const endpoint = publicS3Endpoint();
const url = `${endpoint}/${key}`;