Are multimedia files binary transfered to the server?

I have uploaded a 4 GB form to the SurveyCTO server and the data transfer register on the phone suggests that the data is expanding to 12GB by the time it all gets uploaded.

Question: Does ODK use binary transfer when uploading video, photo or audio files or is it changing the bit stream to text (as does email) so it will survive firewalls better?

It seems like binary transfer would be more efficient for enumerators sending in data on already slow lines where they pay by the GB transfer. I understand that sometimes apps do this to help not get shutdown by firewalls. But, I would not think fire walls are an issue in most areas where surveys are used.

If this is the case (that binary transfer is not being used) is it a big deal to give the enumerator that option in their setup to have binary data sent as binary?

Thanks for your insights!
Bob

The transfer protocol is a webform-based transmission defined here:
https://bitbucket.org/javarosa/javarosa/wiki/FormSubmissionAPI

We are letting the libraries we use do the encoding. In the java code
(InstanceUploaderTask), we have (simplified):

        HttpPost httppost = WebUtils.createOpenRosaHttpPost(u);

        // mime post
        MultipartEntity entity = new MultipartEntity();

        // always send the submission file...
        FileBody fb = new FileBody(submissionFile, "text/xml");
        entity.addPart("xml_submission_file", fb);
         ...
         // add the media attachments
         fb = new FileBody(f, "image/jpeg");
         entity.addPart(f.getName(), fb);

        httppost.setEntity(entity);

        // prepare response and return uploaded
        HttpResponse response = null;
        response = httpclient.execute(httppost, localContext);
ยทยทยท --------------- I had thought that the FileBody would transmit the data in binary for images. If it does convert to base64 by default, if there is an additional flag to add to get it to transmit in binary, contribute a code fix and we'll add it.

That change might require a change on the server
(org.opendatakit.aggregate.parser.MultiPartFormData), or, hopefully, that
processor will just handle the conversion automatically. Right now, it is
just treating everything as a binary stream, so if it is being sent as
base64, it is being converted automatically by the libraries on the server.


Mitch

On Tue, Jul 1, 2014 at 6:58 AM, bobachgill@gmail.com wrote:

I have uploaded a 4 GB form to the SurveyCTO server and the data transfer
register on the phone suggests that the data is expanding to 12GB by the
time it all gets uploaded.

Question: Does ODK use binary transfer when uploading video, photo or
audio files or is it changing the bit stream to text (as does email) so it
will survive firewalls better?

It seems like binary transfer would be more efficient for enumerators
sending in data on already slow lines where they pay by the GB transfer. I
understand that sometimes apps do this to help not get shutdown by
firewalls. But, I would not think fire walls are an issue in most areas
where surveys are used.

If this is the case (that binary transfer is not being used) is it a big
deal to give the enumerator that option in their setup to have binary data
sent as binary?

Thanks for your insights!
Bob

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com