Platform: NodeJS + Typescript + Axios application using the iNaturalist API
Description of problem:
Step 1: Using a high resolution image, attempt to upload full resolution or something at least 2400px wide using this API route: https://www.inaturalist.org/pages/api+reference#post-observation_photos. An image I used is below.
Step 2: Receive response from API with this error message:
MulterError: Field value too long<br> at abortWithCode (/home/inaturalist/deployment/api/releases/20200914204728/node_modules/multer/lib/make-middleware.js:79:22)<br> at Busboy.<anonymous> (/home/inaturalist/deployment/api/releases/20200914204728/node_modules/multer/lib/make-middleware.js:85:34)<br> at Busboy.emit (events.js:210:5)<br> at Busboy.emit (/home/inaturalist/deployment/api/releases/20200914204728/node_modules/busboy/lib/main.js:38:33)<br> at PartStream.onEnd (/home/inaturalist/deployment/api/releases/20200914204728/node_modules/busboy/lib/types/multipart.js:261:15)<br> at PartStream.emit (events.js:215:7)<br> at endReadableNT (_stream_readable.js:1183:12)<br> at Shim.applySegment (/home/inaturalist/deployment/api/releases/20200914204728/node_modules/newrelic/lib/shim/shim.js:1390:20)<br> at wrapper (/home/inaturalist/deployment/api/releases/20200914204728/node_modules/newrelic/lib/shim/shim.js:2014:17)<br> at processTicksAndRejections (internal/process/task_queues.js:80:21)
Repeat, reducing image pixel size, until the error stops. I got the error at 2400px, but not at 1200px. I did not test in between these sizes.
Image I used:
(image is copyright by me, please don’t use)