Open falkogloeckler opened 3 years ago
I made a new repo for this service: geocase-thumbnail.
The service is now available at http://gc-thumbs.test.code.naturkundemuseum.berlin @enmust Can you connect it to the API on your side and see if is works?
Here are some links for testing: List all cached images Delete all images from the cache image 1 image 2 image 3
I added it to the API but I can't properly create/view or delete thumbnails.
When I try to add it just returns 'error 404 page not found' or 'error 400 imaginary request url'. Adding a thumbnail only worked when posting from localhost or from your url (maybe https issue or sth) but I had to encode it beforehand. + deletion only works using wildcard.
I saw. I cannot really say what the issue might be. Maybe you're doubly encoding the url part of the path? If cannot see what happens in the API so i cannot really debug it from this side. Would you like to setup a zoom meeting?
In node app I am just proxying your url using http-proxy-middleware: https://geocase-api.geocollections.info/v1/thumbnail-service/
For testing purposes to check if the same problem still persists I added a proxy to nginx conf: https://geocase-api.geocollections.info/thumbnail-service-test/
For example: I can't add this image: https://files.geocollections.info/86/09/86096e07-da24-449a-8edd-a670d5b3e906.jpg to thumbnail cache.
Does Work (have to encode beforehand): http://gc-thumbs.test.code.naturkundemuseum.berlin/thumbnail/https%3A%2F%2Ffiles.geocollections.info%2F86%2F09%2F86096e07-da24-449a-8edd-a670d5b3e906.jpg
I can view all: https://geocase-api.geocollections.info/v1/thumbnail-service/thumbnails and delete all https://geocase-api.geocollections.info/v1/thumbnail-service/thumbnail/delete/* but I can't add or view existing ones.
I also just tested adding proxy to a non https connected site and it still had the same problem. Therefore it seems like the issue might be related to a proxy.
Just an idea: maybe it would be better to add url to query + also I think we should be able to get image using raw url. For example this url could return thumbnail: http://gc-thumbs.test.code.naturkundemuseum.berlin/thumbnail/?url=https://files.geocollections.info/86/09/86096e07-da24-449a-8edd-a670d5b3e906.jpg
I updated the service to take ?url=...
parameters as replacement for /url
You can use a raw URL but generally speaking i think URLs should be encoded prior to sending. This is because URLs containing their own URL-parameters will not work in GET requests otherwise ( For instance: https://www.nms.ac.uk/search.axd?command=getcontent&server=Detail&value=PF30267 )
I hope it works
Here are some links for testing: List all cached images Delete all images from the cache image 1 image 2 image 3
We need a micro service that helps: