File Upload fails mid request w/ error action has no response #8191
Unanswered
bsmoran620
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm working on a user profile page where the user can view and upload a new avatar image. I built a image to S3 upload feature based on this example: https://github.com/remix-run/examples/blob/main/file-and-s3-upload/app/utils/s3.server.ts
However, when I make the changes I see my action succeeds in uploading the file but crashes before I update the database and can set the avatarURL. I can confirm the file successfully makes it to S3. When debugging, I can see the file get uploaded and correctly returning the s3 file URL. Then in composeUploadHandlers line 23 it hits
return value
;Next my debugger is jumping to reouter.cjs.js line 3967:
And it seems to think my loader in _app.tsx route doesn't return anything:
Here is my s3 utility file under app/utils/aws/s3.ts:
And the action and loader from my user profile route
_app.users.$id.tsx
:At first I thought it might be an issue with file size, so I tried swapping out createMemoryUploadHandler for createFileUploadHandler but no luck. I checked all my routes loaders and can't find any missing a return statement. My thought is that either the request is timing out while waiting for the file upload and I need to extend that timeout. I also tried renaming the s3 utility from s3.ts to s3.server.ts thinking maybe that could be causing it. Or maybe I'm missing an intricacy of route and somehow composeUploadHandlers is returning a value it shouldn't be? But I'm new to Remix so any pointer or ideas would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions