You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to upload a product image file in production I get "Failed to upload the added media. Please try again."
Running the container locally it seems to be able to upload fine.
I'm using DigitalOcean Spaces configured as in the docs.
First image uploaded fine when running the server locally.
Second image is trying to upload in prod.
Access keys being used between running locally and prod is the same.
I think the error is for a later call (updating the product data), meaning the upload of the file itself failed. Do you have logs from the backend? I imagine it could be misconfiguration of the provider or something along those lines, preventing you from successfully uploading the file.
Package.json file
Node.js version
v23.6
Database and its version
PostgreSQL 17.2
Operating system name and version
Docker Version 27.3.1
Browser name
Chrome 131.0.6778.205
What happended?
When trying to upload a product image file in production I get "Failed to upload the added media. Please try again."
Running the container locally it seems to be able to upload fine.
I'm using DigitalOcean Spaces configured as in the docs.
First image uploaded fine when running the server locally.
Second image is trying to upload in prod.
Access keys being used between running locally and prod is the same.
Expected behavior
I can upload product image files
Actual behavior
I'm getting this error:
error: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "images", 1, "url" ], "message": "Required" } ] ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "images", 1, "url" ], "message": "Required" } ] at Object.get error [as error] (/home/node/app/node_modules/@medusajs/medusa/node_modules/zod/lib/types.js:43:31) at ZodObject.parseAsync (/home/node/app/node_modules/@medusajs/medusa/node_modules/zod/lib/types.js:166:22) at processTicksAndRejections (node:internal/process/task_queues:105:5) at async zodValidator (/home/node/app/node_modules/@medusajs/framework/src/zod/zod-helpers.ts:123:12) at async validateBody (/home/node/app/node_modules/@medusajs/framework/src/http/utils/validate-body.ts:30:27) { issues: [ { code: 'invalid_type', expected: 'string', received: 'undefined', path: [Array], message: 'Required' } ], addIssue: [Function (anonymous)], addIssues: [Function (anonymous)], errors: [ { code: 'invalid_type', expected: 'string', received: 'undefined', path: [Array], message: 'Required' } ] } http: POST /admin/products/prod_01JBKWZYVPSABP5XQMW824E6E7 ← https://XXX/app/products/prod_01JBKWZYVPSABP5XQMW824E6E7/media?view=edit (500) - 5.748 ms
Link to reproduction repo
how to reproduce without API keys?
The text was updated successfully, but these errors were encountered: