Replies: 1 comment
-
Few things. Try moving your uploadHandler to a separate file and name it something like storage.server.ts. The .server. will ensure remix includes it server side. Keeping it in your action function will result in an error with node fs. You are missing the I created a repo you can download which is working. You will need to create const {
STORAGE_ENDPOINT,
STORAGE_REGION,
STORAGE_ACCESS_KEY,
STORAGE_SECRET,
STORAGE_BUCKET,
} = process.env; |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi, new to Remix. Trying to pass in multiple images from a single image input field on a form and upload them to s3. I've correctly created my s3 client and am trying to use multipart form data to pass them to the upload handler, which uses the stream to upload. Problem is, my upload handler is never being called. Note the console log statements under the upload handler. They are never logged to console, whereas my fileJsons are (they just display file name).
I followed the tutorials on the docs: https://remix.run/docs/en/v1/api/remix#custom-uploadhandler, as well as other discussions here #2800 (comment) and this one post which was not very helpful as it seems to be for an older version of remix: https://www.canrau.com/en/remix-upload-to-s3
Here is my action function, as well as the Mantine DropZone component I plan to use to handle the file upload as an image input for the form:
Action function:
The 'form':
Any help would be greatly appreciated. Remix is so new, so there are a lot of questions.
Beta Was this translation helpful? Give feedback.
All reactions