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

Support uploading files for creating memories #22

Open
justincy opened this issue Jan 24, 2017 · 0 comments
Open

Support uploading files for creating memories #22

justincy opened this issue Jan 24, 2017 · 0 comments

Comments

@justincy
Copy link
Contributor

justincy commented Jan 24, 2017

FormData makes it really easy to upload files. In the body processing middleware we just need to detect FormData objects and do nothing (don't even set the Content-Type header) so that it gets passed straight to XHR which will correctly process the FormData. Just need to instruct tell users how to properly setup the FormData.

var formData = new FormData();
// Name must be artifact otherwise the API will return a 400
formData.append('artifact', fileBlob);

Are there other usecases we need to support where a blob isn't available?

@justincy justincy changed the title Support uploading files for memories Support uploading files for creating memories Jan 24, 2017
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

1 participant