Update BLOB Field

Hi everybody,

i've tried to update media files (csv files) directly to Mysql as 

LongBlob through a Java client.

I' have made the update with 4 csv files and with two files all gone fine,
but with the other two files i get the following error in ODK COLLECT
client when i try to download them from the server...

Premature end of content - length delimited message body (expected 2808;
received 146)

Any ideas

Panos

Moving this to the dev list.

Directly manipulating data in the DB is a terrible idea. Once you go
down that path, it's going to be near impossible for anyone to help
undo. Any reason why you aren't using the API?

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Aug 8, 2014 at 7:18 AM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Hi everybody,

i've tried to update media files (csv files) directly to Mysql as

LongBlob through a Java client.

I' have made the update with 4 csv files and with two files all gone fine,
but with the other two files i get the following error in ODK COLLECT client
when i try to download them from the server...

Premature end of content - length delimited message body (expected 2808;
received 146)

Any ideas

Panos

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

The wired thing is that if the same files trying to upload to Aggregate
with the traditional way all works fine ....

Thanks again..

··· On Friday, August 8, 2014 5:18:58 PM UTC+3, Panos Papadatos wrote: > > Hi everybody, > > i've tried to update media files (csv files) directly to Mysql as > LongBlob through a Java client. > > I' have made the update with 4 csv files and with two files all gone fine, > but with the other two files i get the following error in ODK COLLECT > client when i try to download them from the server... > > Premature end of content - length delimited message body (expected 2808; > received 146) > > Any ideas > > Panos >

Thread moved to dev list.
https://groups.google.com/forum/#!topic/opendatakit-developers/As3H58i--kg

··· On Fri, Aug 8, 2014 at 7:36 AM, Panos Papadatos wrote: > The wired thing is that if the same files trying to upload to Aggregate with > the traditional way all works fine .... > > Thanks again.. > > > On Friday, August 8, 2014 5:18:58 PM UTC+3, Panos Papadatos wrote: >> >> Hi everybody, >> >> i've tried to update media files (csv files) directly to Mysql as >> LongBlob through a Java client. >> >> I' have made the update with 4 csv files and with two files all gone fine, >> but with the other two files i get the following error in ODK COLLECT client >> when i try to download them from the server... >> >> Premature end of content - length delimited message body (expected 2808; >> received 146) >> >> Any ideas >> >> Panos > > -- > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.

Note that if you are using a LONGBLOB, you need to increase your
communications buffer size in MySQL and restart the MySQL database server.

There was an older revision of ODK Aggregate that used LONGBLOB (v1.2) but
we reverted back to the default smaller blob size in v1.3 to avoid this
extra configuration step.

··· ======

If you have a form definition, and want to update the media attachments for
it, you can simply re-upload the exact same form definition file with the
revised media attachments, and the server will replace them. I.e., you can
do a multi-part form data post to the server.

And -- we have a specific Java executable that does exactly that -- ODK
FormUploader, available on our downloads page.

You don't need to write or use your own API, or hack this action out of ODK
Briefcase.

If you want a command line interface to that tool, if you submit a code
change to add that, we will fold it into the next release (Nafundi, for
example, has contributed a CLI for Briefcase that will be in the upcoming
1.4.4 release).

Mitch

On Fri, Aug 8, 2014 at 7:28 AM, Yaw Anokwa yanokwa@nafundi.com wrote:

Moving this to the dev list.

Directly manipulating data in the DB is a terrible idea. Once you go
down that path, it's going to be near impossible for anyone to help
undo. Any reason why you aren't using the API?

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Aug 8, 2014 at 7:18 AM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Hi everybody,

i've tried to update media files (csv files) directly to Mysql as

LongBlob through a Java client.

I' have made the update with 4 csv files and with two files all gone
fine,
but with the other two files i get the following error in ODK COLLECT
client
when i try to download them from the server...

Premature end of content - length delimited message body (expected 2808;
received 146)

Any ideas

Panos

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--
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

Hi Yaw,i have create an automatic procedure that generate the csv files of
a XForm (every night).
I want with an batch procedure to upload the csv files as media files of
the XForm.

Tha XForm doesn't change but i want to change the media files...

Any help how to do this using the API ????

Thanks in advance
Panos

··· On Friday, August 8, 2014 5:29:00 PM UTC+3, Yaw Anokwa wrote: > > Moving this to the dev list. > > Directly manipulating data in the DB is a terrible idea. Once you go > down that path, it's going to be near impossible for anyone to help > undo. Any reason why you aren't using the API? > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > On Fri, Aug 8, 2014 at 7:18 AM, Panos Papadatos <ppapad...@gmail.com > wrote: > > Hi everybody, > > > > i've tried to update media files (csv files) directly to Mysql as > > LongBlob through a Java client. > > > > I' have made the update with 4 csv files and with two files all gone > fine, > > but with the other two files i get the following error in ODK COLLECT > client > > when i try to download them from the server... > > > > Premature end of content - length delimited message body (expected 2808; > > received 146) > > > > Any ideas > > > > Panos > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google > Groups > > "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to opendatakit...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. >

Panos,

As Mitch suggested, you should look at the ODK FormUploader. It uses
the API to upload media files and you'll need to do exactly that with
your system.

https://code.google.com/p/opendatakit/source/browse?repo=briefcase is
where the relevant code lives.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Mon, Aug 25, 2014 at 4:58 AM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Hi Yaw,i have create an automatic procedure that generate the csv files of a
XForm (every night).
I want with an batch procedure to upload the csv files as media files of the
XForm.

Tha XForm doesn't change but i want to change the media files...

Any help how to do this using the API ????

Thanks in advance
Panos

On Friday, August 8, 2014 5:29:00 PM UTC+3, Yaw Anokwa wrote:

Moving this to the dev list.

Directly manipulating data in the DB is a terrible idea. Once you go
down that path, it's going to be near impossible for anyone to help
undo. Any reason why you aren't using the API?

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Aug 8, 2014 at 7:18 AM, Panos Papadatos ppapad...@gmail.com wrote:

Hi everybody,

i've tried to update media files (csv files) directly to Mysql as

LongBlob through a Java client.

I' have made the update with 4 csv files and with two files all gone
fine,
but with the other two files i get the following error in ODK COLLECT
client
when i try to download them from the server...

Premature end of content - length delimited message body (expected 2808;
received 146)

Any ideas

Panos

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--
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.