Where is it stored Media file?

What is the problem? Please be detailed.

I upload the survey (.xml) and the media files (three .csv files) throught the ODK Aggregate panel. The survey becomes from xml to data tables (MySQL in my case), but I don't know how to find the .csv data in the tables or on the server... where is it? I need to update the .csv data without updating the survey.

What ODK tool and version are you using? And on what device and operating system version?

ODK Aggregate and ODK 1.15.1

What steps can we take to reproduce the problem?

None, only tell me where to find the .csv or the data tables... ¿can i update the data without update the survey?

What you have you tried to fix the problem?

Search the .csv on my Ubuntu Server (Linux) and throught the ODK Tables from MySQL

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Nope. Thanks for all!

You can upload exactly the same survey you had uploaded before and attach the CSV data to it. No need to update the form version if you're only updating the attachments.

2 Likes

Hi @LN! Thanks for the reply, that's exactly what i needed!

So, now i have another question. Is there any method to update the .csv without the ODK Aggregate panel. I mean, throught the database (MySQL) or another method? this is because we need to automatizate the task for update the dataset, and for not do manually.

How to update media file (.csv) only using curl? - #2 by LN describes how. @KitoDavy, I see you never got a response to your follow-up question there which was the same as @varilla's original one here -- you can update just the media by sending the same blank form.

The full curl command would be something like:

curl --verbose --digest --user <username>:<password>
--header "Content-Type: multipart/form-data" \
--form form_def_file=@my-form.xml \
--form mediaFiles=@/Users/data.csv  \
--form mediaFiles=@/Users/image1.jpg \
--form mediaFiles=@/Users/image2.jpg  \
https://<servername>.appspot.com/formUpload 

Note that what you're doing in that case is filling out the web form as though you were a browser. There's no nice API for doing these kinds of things in Aggregate which is one of the reasons ODK Central is being developed.

1 Like

Well, that's all. Thanks @LN, u are great! I think i can do a crontab on my Ubuntu server to run that commands. I readed the ODK Central's docs and i'm sure that's a good soft. Perhaps i will try it, but for the moment cannot use it on production scene, so i'll solve this with the curls commands writed before.

Thanks again! regards from Argentina !

1 Like