-
Notifications
You must be signed in to change notification settings - Fork 1
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
[MPDX-8440] Remove TNT import file upload restriction #1180
Conversation
* Give variable a more descriptive name * Remove a redundant call to revokeObjectURL
Preview branch generated at https://hs-1255279-tnt-import-size.d3dytjb8adxkk5.amplifyapp.com |
}, | ||
body: form, | ||
}, | ||
).catch(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch
throws if there was a network error such that it couldn't make the request it all. It resolves to a response with ok: false
if there was an HTTP error (i.e. 4xx or 5xx status code). That's why I switched this error message to be more accurate.
Bundle sizes [mpdx-react]Compared against 62fca45 No significant changes found |
@@ -174,10 +178,6 @@ const TntConnect: React.FC<Props> = ({ accountListId }: Props) => { | |||
return; | |||
} | |||
|
|||
if (tntFile) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old blob will already be released by the useEffect
cleanup function on line 164.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks great! As I didn't build it, I will let @caleballdrin test the UI as he built the UI and had a lot of the TNT files.
@caleballdrin Can you test the UI of this PR by uploading some of your test TNT files? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested it and it worked! However, I didn't try it with a file over 1mb.
It worked with the 13.5MB one in the HelpScout ticket https://secure.helpscout.net/api/v1/conversations/2756145432/attachments/733246685/file |
Description
The Amplify maximum body size for lambda file uploads of 1MB is too small for some users' multi-MB TNT uploads. Instead of uploading TNT exports to the lambda, upload them directly to the API and remove the file size restriction.
I also cleaned up a few things in the
TntConnect
component:Testing
I downloaded and used this fixture to test the upload.
MPDX-8440
https://secure.helpscout.net/conversation/2756145432/1255279/
https://secure.helpscout.net/conversation/2756616046/1255472/
Checklist: