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:
@ -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}`;
|
||||
|
Reference in New Issue
Block a user