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

Need Docs: Dependency on 'multer' when integrating keystone with existing express app #1081

Closed
v1p opened this issue Feb 19, 2015 · 3 comments
Assignees

Comments

@v1p
Copy link

v1p commented Feb 19, 2015

Man this is an awesome node framework, getting a schema less CMS running in no time.
I was trying to integrate the latest 0.3.1 into my app. And almost spent many hours figuring out why POST data's body is going as {}.
Then I saw this issue #309 is asking to add multipart/form-data to all the forms.
Now, if the parent app is not making use of multer or multipart/form-data parsing at all, this becomes an untraceable problem, unless we go put debug statements in views/list.js.

Perhaps if this can be added to documentation ?

And oh yeah, I got keystone to work with my app (after adding multer ofcourse) & it's awesome!

@v1p v1p changed the title Update Documentation w.r.t 'Multer' usage Dependency on 'multer' when integrating keystone with existing express app - Need to add this to documentation Feb 19, 2015
@morenoh149
Copy link
Contributor

did you see these? https://github.com/keystonejs/keystone/wiki/Knowledge-Base https://github.com/keystonejs/keystone/wiki/How-to-Add-Keystone-to-an-Already-Existing-Express-App
If you didn't we could refer to it more prominently in the docs. If you did could you add in solutions to the difficulties you had.

@v1p
Copy link
Author

v1p commented Feb 20, 2015

@morenoh149 : It'll be great if this is added to documentation more prominently, otherwise rest of the setup was fairly trivial, to get keystone working with an existing express app.

I did referred to wiki & saw the example of setting the app up. 'multer', it wasn't clear that why it's required. Not every app has use of mutlipart/form(even if bodyParser is going to be deprecated w.r.t express 4, it doesn't justify to move every form to multipart/form-data type encoding), so I had to manually debug the middleware data flow to understand what was happening.

I know I could have just copy pasted the whole example from the wiki, but from my past experiences in the copy/paste style of getting things done, I was not comfortable doing that. Only after reading through #309, I got to know that all admin forms have the encType set to multipart/form-data, and my middleware had no configuration to parse it.

Thus, after adding multer to express config (only required by keystone though, I have no multipart forms in my app), I got keystone to work flawlessly, with my existing app.

@estilles estilles changed the title Dependency on 'multer' when integrating keystone with existing express app - Need to add this to documentation Need Docs: Dependency on 'multer' when integrating keystone with existing express app Feb 22, 2015
@andrewlinfoot
Copy link
Contributor

We're closing all documentation requests to keep the issue tracker unpolluted. I've moved this request over to the documentation repo: keystonejs/keystonejs-site#95

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

4 participants