Skip to content

Commit

Permalink
fix: use ANY as method
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Oct 3, 2019
1 parent cb4db43 commit 954e7e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/serverless-files/serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class FilesComponent extends Component {
handler: "handler.handler",
description: "Returns pre-signed POST data for client-side file uploads.",
env: {
S3_BUCKET: s3Output.arn
S3_BUCKET: '123'
}
});

Expand All @@ -47,8 +47,8 @@ class FilesComponent extends Component {
const apolloOutput = await apolloService({
plugins,
extraEndpoints: [
{ path: "/download/{path}", method: "GET", function: readFn.arn },
{ path: "/upload", method: "POST", function: uploadFn.arn }
{ path: "/download/{path}", method: "ANY", function: readFn.arn },
{ path: "/upload", method: "ANY", function: uploadFn.arn }
],
...rest
});
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/plugins/fileUploaderPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default (config: Object = {}): FileUploaderPlugin => ({
type: "file-uploader",
name: "file-uploader",
upload: async (file: File) => {
const uri = config.uri || "https://9qaw9vy7d0.execute-api.us-east-1.amazonaws.com/prod/upload";
const uri = config.uri || "https://ynpxmzpxah.execute-api.us-east-1.amazonaws.com/prod/upload";

const presignedPostPayload = await new Promise(resolve => {
const xhr = new window.XMLHttpRequest();
Expand Down

0 comments on commit 954e7e2

Please sign in to comment.