-
Notifications
You must be signed in to change notification settings - Fork 120
Add parameters to syncing binary images to decrease size #134
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
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,5 +4,5 @@ | |
| * @author [email protected] | ||
| */ | ||
| public enum SyncActions { | ||
| IDLE, MONITOR_SYNCING, SYNC, RESET_SERVER | ||
| IDLE, MONITOR_SYNCING, SYNC, RESET_SERVER, RE_DOWNLOAD | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1053,14 +1053,20 @@ public void uploadInstanceFileBatch(List<CommonFileAttachmentTerms> batch, | |
| @Override | ||
| public void downloadInstanceFileBatch(List<CommonFileAttachmentTerms> filesToDownload, | ||
| String serverInstanceFileUri, String instanceId, String tableId) throws HttpClientWebException, IOException { | ||
| // boolean downloadedAllFiles = true; | ||
| downloadInstanceFileBatch(filesToDownload, serverInstanceFileUri, instanceId, tableId, false); | ||
| } | ||
|
|
||
| @Override | ||
| public void downloadInstanceFileBatch(List<CommonFileAttachmentTerms> filesToDownload, | ||
| String serverInstanceFileUri, String instanceId, String tableId, boolean reduce) throws HttpClientWebException, IOException { | ||
| // boolean downloadedAllFiles = true; | ||
| 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"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| entries.add(entry); | ||
| } | ||
|
|
||
|
|
||
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.