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

xhrOptions options param to pass to bureaucracy #44

Merged
merged 1 commit into from Sep 8, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion readme.markdown
Expand Up @@ -212,9 +212,12 @@ If you wish to set up file uploads, _in addition to letting the user just paste
// image field key, passed to bureaucracy, which defaults to 'uploads'
fieldKey: 'uploads',

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

// optional options for `xhr` upload request, passed to `bureaucracy`
xhrOptions: { headers: {} },

// 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
Expand Up @@ -112,6 +112,7 @@ function prompt (options, done) {
method: upload.method,
formData: upload.formData,
fieldKey: upload.fieldKey,
xhrOptions: upload.xhrOptions,
endpoint: upload.url,
validate: 'image'
});
Expand Down