-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add parameters to syncing binary images to decrease size #134
base: development
Are you sure you want to change the base?
Conversation
…load all reduced-size images if wanted.
Can one of the admins verify this patch? Also need an authorization to run tests. |
runtests |
runtests |
1 similar comment
runtests |
URI instanceFilesDownloadUri = wrapper.constructInstanceFileBulkDownloadUri(serverInstanceFileUri, instanceId); | ||
|
||
ArrayList<OdkTablesFileManifestEntry> entries = new ArrayList<OdkTablesFileManifestEntry>(); | ||
for (CommonFileAttachmentTerms cat : filesToDownload) { | ||
OdkTablesFileManifestEntry entry = new OdkTablesFileManifestEntry(); | ||
entry.filename = cat.rowPathUri; | ||
entry.reduceFileSize = reduce ? "t" : "f"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly recommend to use "true" and "false" instead of "t" and "f" as you can then simply use the Boolean class to convert the parameters. Consistency is important and if it's meant as true and false then use true and false.
runtests |
URI instanceFilesDownloadUri = wrapper.constructInstanceFileBulkDownloadUri(serverInstanceFileUri, instanceId); | ||
|
||
ArrayList<OdkTablesFileManifestEntry> entries = new ArrayList<OdkTablesFileManifestEntry>(); | ||
for (CommonFileAttachmentTerms cat : filesToDownload) { | ||
OdkTablesFileManifestEntry entry = new OdkTablesFileManifestEntry(); | ||
entry.filename = cat.rowPathUri; | ||
entry.reduceFileSize = reduce ? "t" : "f"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, OdkTablesFileManifestEntry is one of the classes found in the odk-rest-interface jar. In order for this change to work, the odk-rest-interface jar will need to be packaged with the change to OdkTablesManifestEntry in the sync-endpoint and put into androidlibrary under the androidlibrary/androidlibrary_lib/libs directory.
adding ability to sync reduced-size image attachments for server and redownload all reduced-size images if ever wanted
depends on:
odk-x/sync-endpoint#20
odk-x/androidlibrary#127