File Repository merge requestshttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests2024-03-06T16:53:26+01:00https://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/81Zip: Removed limit on number of files to download as zip2024-03-06T16:53:26+01:00Matija ObrezaZip: Removed limit on number of files to download as zipThis MR does not load file contents to memory and uses stream transfer instead. This keep memory usage low and we can afford to remove the limit on the number of files allowed to download.This MR does not load file contents to memory and uses stream transfer instead. This keep memory usage low and we can afford to remove the limit on the number of files allowed to download.5.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/80Resolve "Spotbugs"2024-03-13T13:10:01+01:00Artem HrybeniukResolve "Spotbugs"Closes #45Closes #455.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/79Added removeFileIfPossible(file)2023-11-14T11:35:32+01:00Matija ObrezaAdded removeFileIfPossible(file)Deleting entity with JPA/Hibernate causes Hibernate to flag the entire transaction as read-only because of a deep SQL exception. This is considered fatal in Hibernate.
This implementation uses JDBC to execute delete statements outside e...Deleting entity with JPA/Hibernate causes Hibernate to flag the entire transaction as read-only because of a deep SQL exception. This is considered fatal in Hibernate.
This implementation uses JDBC to execute delete statements outside entity manager, catches `DataViolationException` and throws a `new ReferencedRepositoryFileException` that does not roll-back the transaction.5.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/78Code coverage: Upgrade to JUnit52023-10-25T16:02:46+02:00Artem HrybeniukCode coverage: Upgrade to JUnit5Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/77Support java.io.InputStream uploads2023-10-25T07:10:19+02:00Matija ObrezaSupport java.io.InputStream uploadsImproves handling of very large files.Improves handling of very large files.5.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/76Support java.io.File2023-10-25T06:17:15+02:00Matija ObrezaSupport java.io.FileUsing `File` instead of `byte[]` let's us skip reading large files into memory.Using `File` instead of `byte[]` let's us skip reading large files into memory.5.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/75Add support for java.io.File2023-10-25T06:17:21+02:00Matija ObrezaAdd support for java.io.FileWe can avoid reading entire files into memory!We can avoid reading entire files into memory!5.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/74gradle2023-10-25T06:17:27+02:00Matija Obrezagradle5.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/73Resolve "Dependencies"2023-10-12T20:35:57+02:00Artem HrybeniukResolve "Dependencies"Closes #44Closes #445.1Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/72RepositoryFile#path is not used anywhere in code2023-09-12T15:06:18+02:00Matija ObrezaRepositoryFile#path is not used anywhere in codeRemoved `path` from `RepositoryFile`. It doesn't appear to be populated by repo services and is not used anywhere in the code.
If this is merged, then projects using `file-repository` dependency should remove the field `path` from relev...Removed `path` from `RepositoryFile`. It doesn't appear to be populated by repo services and is not used anywhere in the code.
If this is merged, then projects using `file-repository` dependency should remove the field `path` from relevant tables.5.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/71pom: Updated dependencies2023-09-20T16:01:49+02:00Artem Hrybeniukpom: Updated dependenciesRelated to https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/merge_requests/807.Related to https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/merge_requests/807.5.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/70app-blocks@5.02023-09-20T16:01:49+02:00Matija Obrezaapp-blocks@5.0Initial code for app-blocks@5.0.
Please review models and filters.Initial code for app-blocks@5.0.
Please review models and filters.5.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/69POM: Dependency upgrades2023-09-01T08:16:16+02:00Artem HrybeniukPOM: Dependency upgrades4.1Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/68RepositoryServiceImpl: Fix removing image file with thumbnails2022-12-05T18:56:24+01:00Artem HrybeniukRepositoryServiceImpl: Fix removing image file with thumbnailsRelated to https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/merge_requests/733.Related to https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/merge_requests/733.4.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/67Support streamable downloading of RepositoryFile2022-12-05T18:56:24+01:00Matija ObrezaSupport streamable downloading of RepositoryFileSupport for downloading file bytes to target stream. Our `BytesStorageService` supports it already.Support for downloading file bytes to target stream. Our `BytesStorageService` supports it already.4.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/66Extract zip: Ignore content type and check extension2022-12-05T18:56:24+01:00Matija ObrezaExtract zip: Ignore content type and check extensionIt appears that `zip` archives from Windows sometimes come with content type `application/x-zip-compressed`. In that case, the user cannot unzip the archive because we check for `application/zip` only:
```json
{"error":"Incompatible con...It appears that `zip` archives from Windows sometimes come with content type `application/x-zip-compressed`. In that case, the user cannot unzip the archive because we check for `application/zip` only:
```json
{"error":"Incompatible content type for extracting: application/x-zip-compressed","localizedError":"Incompatible content type for extracting: application/x-zip-compressed"}
```
This MR changes the first test to inspect only that `file.extension == '.zip'` (before loading bytes) and then wraps the unzipping operation in a `try () { }` block.4.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/65Resolve "DatabaseBytesStorage"2022-09-06T15:58:44+02:00Artem HrybeniukResolve "DatabaseBytesStorage"Closes #43Closes #434.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/64Time: Update to java.time.*2022-12-05T18:56:23+01:00Matija ObrezaTime: Update to java.time.*4.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/63Resolve "Extract ZIP archive"2022-03-31T14:39:13+02:00Artem HrybeniukResolve "Extract ZIP archive"Closes #42Closes #423.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/merge_requests/62Resolve "Download folder as Zip archive"2022-03-18T18:31:56+01:00Artem HrybeniukResolve "Download folder as Zip archive"Closes #41Closes #413.2Artem HrybeniukArtem Hrybeniuk