-
Notifications
You must be signed in to change notification settings - Fork 24
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
Uploading images from files is not supported #350
Comments
The image server now directly loads images from URLs, rather than them being downloaded to a temporary location and then uploaded. This, of course, doesn't work for locally stored images. |
Notes on testing. Attached is a test configuration that is pointing towards images-dev, collections-test etc. and a null cassandra store. You will need to have localhost:8983 pointing towards a solr instance. biocache-test-config.properties.zip https://collections-test.ala.org.au/dataResource/show/dr8259 is linked to a DwCA with images and a dud URL. Note that the rowType of the core in the DwCA must have a type of |
…y the official TDWG guide) Signed-off-by: Peter Ansell <[email protected]>
Signed-off-by: Peter Ansell <[email protected]>
The test archive that Doug linked to above only has a small number of images. Using this code on a larger set shows that it has a resource leak in the HTTP client connection pool where it isn't releasing resources after use. This is the console output and the start of the threaddump showing the resource leak (The threaddump was performed by running
|
Note the time difference between 11:51 in the biocache-store log and 12:08 when I ran the threaddump. |
…connections Signed-off-by: Peter Ansell <[email protected]>
Fixed the resource issue, but found new issue related to spaces in file names that are not being encoded correctly at this point in some part of the image handling code:
|
Signed-off-by: Peter Ansell <[email protected]>
This appears to be fixed now. Just waiting on the next reindex to verify that the data resource was loaded properly. The images look okay in the viewer, just want to make sure they were linked up to the record correctly: |
The
RemoteMediaStore.uploadImage(...)
method that looks like it should support uploading images from files is not currently called from anywhere:https://github.com/AtlasOfLivingAustralia/biocache-store/blob/develop/src/main/scala/au/org/ala/biocache/load/MediaStore.scala#L532
The reference in
RemoteMediaStore.save
is only to images that are hosted externally:https://github.com/AtlasOfLivingAustralia/biocache-store/blob/develop/src/main/scala/au/org/ala/biocache/load/MediaStore.scala#L312
This is blocking image uploads that are done from local files where the images have been sent directly to us rather than being hosted somewhere.
The text was updated successfully, but these errors were encountered: