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

Consider inline embedded media data in the JSON data file #3

Open
markboots opened this issue Jul 6, 2017 · 5 comments
Open

Consider inline embedded media data in the JSON data file #3

markboots opened this issue Jul 6, 2017 · 5 comments

Comments

@markboots
Copy link
Contributor

The first version of the spec stores media data (image, audio, video) simply as a URL to an external resource.

[ "2017-05-23T17:25:12-04:00", 20394823956, 923842093, "ae54da", "https://myexampleflowserver.org/resources/audio/20394823956.ogg", {"type": "audio", "language": "eng", "format": "audio/ogg"} ],

Is it valuable to allow embedding the media for any of these question types within the JSON data file? One possibility is to allow a base-64 encoded string in place of the URL, and a response metadata indicating "inline":1, "format":"audio/ogg", "extension":".ogg"

This allows reducing external dependencies, at the expense of large data file sizes, and the requirement to support two code paths.

@pld
Copy link

pld commented Jul 6, 2017 via email

@nicpottier
Copy link

No denying there is something appealing about having a single file that is guaranteed to be complete. Seems like supporting this as an optional thing would be useful for say one-time batch exports where the result could be zipped in the end (removing most of the downsides of base64 encoding). For actually sending stuff over APIs I would think this is an antipattern just because these will quickly grow into payloads that are impractical to transfer in a single request.

@pld
Copy link

pld commented Jul 6, 2017 via email

@ggiraldez
Copy link
Collaborator

I think this is a nice to have, but should definitely be optional, and consumer configurable via a parameter.

Also, since we already have two separate "files" (ie. schema and response data) I'd assume we might want to package both in some way, eg. a .zip file. @pld what about embedding the images in the zip file? Would that still work for your use case?

@pld
Copy link

pld commented Jul 13, 2017 via email

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