[ODK Developers] ODK - How to change the process of storing an image/video file in binary format to original File format in MySQL/PostgreSQL

Your media content storage would be of type BLOB(binary large objects) if
saved in DB.
You can definitely store your images on local file system and have a table
with the reference to the media file on your file system.

--Deepak

··· On Wed, Jan 30, 2013 at 4:02 PM, avadhani ramakrishna < avadhanirk.507@gmail.com> wrote:

Hai Everyone.

I have implemented ODK server in my machine using both MySQL as well as
PostgreSQL databases and ODKAggregate 1.0.2 installer file. The data is
perfectly storing in both the databases. While checking the tables having
image/video data, it is storing in a binary format. Obviously that's fine.
But, My Superior came up with a thought saying that "Find the process in
such a way that the images/video data tables must contain the data like
image_name, image_path_in_server and the media content should be saved in
original format in file system(currently in my machine)". Can i achieve
that? Please provide your thoughts for implementing this.

Thanks
Avadhani Ramakrishna.

--
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/groups/opt_out.

--
Deepak Sharma
http://www.linkedin.com/in/rikindia

That would be for you to code up!

But I don't understand why.

Either you trust your database to accurately preserve your data, and the
webserver to accurately vend it back to you, or you don't. Given the
instanceID of a data element, you can construct up the http: request to
fetch any image or file in the database, and because it is a request to the
webserver, you use the same set of security checks for data access as to
the ODK Aggregate site itself. See
https://groups.google.com/forum/?fromgroups=#!searchin/opendatakit-developers/binary$20url/opendatakit-developers/sijorgwMtGA/pq8d6OFJJn4J

If you need the images as files on a server, consider running ODK Briefcase
nightly to download the files to your system. The briefcase storage
location will contain directories for each data instance, and within those,
it will contain the associated audio/video/image files. You could then
archive the entire ODK Briefcase directory as a separate form of data
backup from the database backups you should already be performing.

··· ------------

Note also, that on MySQL, BLOB data is always stored as separate files
already. So this is already being done by MySQL under the covers. Making
this explicit in the application layer doesn't make a whole lot of sense.
It also is impossible to do on Google AppEngine, and will complicate the
scaling of the system if you need to run multiple webservers accessing a
common database. Scaling would require adding network storage,
administering access to that, and handling failures when NFS or Samba
mounts fail (and they do fail). Restoring mounts is not always 100%
automatic.

Doing anything like this is truly not worth the added trouble.

Mitch

On Wed, Jan 30, 2013 at 2:59 AM, avadhani ramakrishna < avadhanirk.507@gmail.com> wrote:

Yes, Media content is of type BLOB in DB. Can u please provide the way to
store images on local file system with links having samples...

On Wed, Jan 30, 2013 at 4:26 PM, Deepak Sharma deepakmca05@gmail.comwrote:

Your media content storage would be of type BLOB(binary large objects) if
saved in DB.
You can definitely store your images on local file system and have a
table with the reference to the media file on your file system.

--Deepak

On Wed, Jan 30, 2013 at 4:02 PM, avadhani ramakrishna < avadhanirk.507@gmail.com> wrote:

Hai Everyone.

I have implemented ODK server in my machine using both MySQL as well as
PostgreSQL databases and ODKAggregate 1.0.2 installer file. The data is
perfectly storing in both the databases. While checking the tables having
image/video data, it is storing in a binary format. Obviously that's fine.
But, My Superior came up with a thought saying that "Find the process in
such a way that the images/video data tables must contain the data like
image_name, image_path_in_server and the media content should be saved in
original format in file system(currently in my machine)". Can i achieve
that? Please provide your thoughts for implementing this.

Thanks
Avadhani Ramakrishna.

--
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/groups/opt_out.

--
Deepak Sharma
http://www.linkedin.com/in/rikindia

--
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/groups/opt_out.

--
Avadhani.Y.V.R.K.S.,
Android Apps. Developer,
iPowerFour Technologies Pvt. Ltd.
(avadhanirk.507@gmail.com)
(+918099164962)

--
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/groups/opt_out.

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