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

initial stab at submitting image/attachment formData via bureaucracy #40

Merged
merged 1 commit into from
Aug 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/bevacqua/woofmark",
"dependencies": {
"bullseye": "1.4.6",
"bureaucracy": "1.0.5",
"bureaucracy": "1.0.6",
"crossvent": "1.5.0",
"kanye": "3.0.2",
"local-storage": "1.4.2",
Expand Down
3 changes: 3 additions & 0 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ If you wish to set up file uploads, _in addition to letting the user just paste
// endpoint where the images will be uploaded to, required
url: '/uploads',

// optional additional form submission data, passed to bureaucracy
formData: { description: 'A new image' },

// optional text describing the kind of files that can be uploaded
restriction: 'GIF, JPG, and PNG images',

Expand Down
1 change: 1 addition & 0 deletions src/prompts/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function prompt (options, done) {

var bureaucrat = bureaucracy.setup(domup.fileinput, {
method: upload.method,
formData: upload.formData,
endpoint: upload.url,
validate: 'image'
});
Expand Down