Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Upload as a Visitor #5

Open
donblackowiak opened this issue Jul 7, 2018 · 1 comment
Open

Image Upload as a Visitor #5

donblackowiak opened this issue Jul 7, 2018 · 1 comment

Comments

@donblackowiak
Copy link

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: Path ip is 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
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants