JKHeadley / appy

πŸš€ A full stack boilerplate web app
https://appyapp.io
MIT License
255 stars 65 forks source link

Image Upload as a Visitor #5

Open donblackowiak opened 6 years ago

donblackowiak commented 6 years ago

Hi, I am testing the demo, and in a local install and at https://demo.appyapp.io/images/create a visitor cannot upload an image. In the frontend, it's stuck "Finalizing..." and on the backend, the local logs show: [18:08:09.642] 8433 ERROR node_modules/rest-hapi/utilities/handler-helper.js:380:11 api/generate-routes/Visitor β€” ValidationError:visitor validation failed: ip: Pathipis required. [18:08:09.642] 8433 ERROR node_modules/rest-hapi/utilities/handler-helper.js:380:11 api/generate-routes/Visitor β€” at new ValidationError (/Users/don/WebstormProjects/appy/backend/node_modules/mongoose/lib/error/validation.js:27:11) [18:08:09.642] 8433 ERROR node_modules/rest-hapi/utilities/handler-helper.js:380:11 api/generate-routes/Visitor β€” at model.Document.invalidate (/Users/don/WebstormProjects/appy/backend/node_modules/mongoose/lib/document.js:1725:32) [18:08:09.642] 8433 ERROR node_modules/rest-hapi/utilities/handler-helper.js:380:11 api/generate-routes/Visitor β€” at /Users/don/WebstormProjects/appy/backend/node_modules/mongoose/lib/document.js:1597:17 [18:08:09.642] 8433 ERROR node_modules/rest-hapi/utilities/handler-helper.js:380:11 api/generate-routes/Visitor β€” at /Users/don/WebstormProjects/appy/backend/node_modules/mongoose/lib/schematype.js:785:9 [18:08:09.642] 8433 ERROR node_modules/rest-hapi/utilities/handler-helper.js:380:11 api/generate-routes/Visitor β€” at process._tickCallback (internal/process/next_tick.js:176:11) Debug: internal, implementation, error Error: There was an error creating the resource. at _createHandler (/Users/don/WebstormProjects/appy/backend/node_modules/rest-hapi/utilities/handler-helper.js:384:20) at <anonymous> at process._tickCallback (internal/process/next_tick.js:182:7) [18:09:07.836] 8433 LOG api/user/GetAll β€” getImages + params({"ownerId":"5b4133607a3c7c2063c8bbca"}), query({"isDeleted":false}), payload(null)

JKHeadley commented 6 years ago

@donblackowiak I'm not sure if I understand the question. The visitor endpoint is just to record information about visitors to the site. If you would like to upload images, you need to set up an S3 bucket with AWS, and fill out the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY of the .env file, as well as the S3BucketName property in config/index.js.