mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
fix big files upload issue
This commit is contained in:
+3
-2
@@ -36,8 +36,9 @@ export function middleware(req: NextRequest) {
|
||||
|
||||
/**
|
||||
* Configure which routes should pass through the Middleware.
|
||||
* Exclude all `_next` urls.
|
||||
*/
|
||||
export const config = {
|
||||
matcher: [ '/', '/:notunderscore((?!_next).+)' ],
|
||||
matcher: [
|
||||
'/((?!.*\\.|api\\/|node-api\\/).*)', // exclude all static + api + node-api routes
|
||||
],
|
||||
};
|
||||
|
||||
@@ -31,6 +31,11 @@ const moduleExports = {
|
||||
redirects,
|
||||
headers,
|
||||
output: 'standalone',
|
||||
api: {
|
||||
// disable body parser since we use next.js api only for local development and as a proxy
|
||||
// otherwise it is impossible to upload large files (over 1Mb)
|
||||
bodyParser: false,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = moduleExports;
|
||||
|
||||
@@ -108,7 +108,10 @@ const ContractVerificationForm = ({ method: methodFromQuery, config, hash }: Pro
|
||||
variant: 'subtle',
|
||||
isClosable: true,
|
||||
});
|
||||
}, [ formState.isSubmitting, toast ]);
|
||||
// callback should not change when form is submitted
|
||||
// otherwise it will resubscribe to channel, but we don't want that since in that case we might miss verification result message
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [ toast ]);
|
||||
|
||||
const channel = useSocketChannel({
|
||||
topic: `addresses:${ hash.toLowerCase() }`,
|
||||
|
||||
Reference in New Issue
Block a user