I am trying to list images from the files collection. I have a second collection called gallery which has the contains the image names from the files collection. I am performing a list service for the gallery collection and converting the image filename into a url for the corresponding items in the files collection. The image URL seems to be getting corrupted somewhere.
For example if I pass a URL of 'https://api.appery.io/rest/1/db/files...' It appears to be trying to save the image URL as 'http://appery.io/app/view/3e4a219b-e1...'
Here is a section from my console.log:
imageFilename = 10f120e0-0ffd-42d8-91a5-04df1ca6ac83.SA3.png
VM103081:278
imageURL = https//api.appery.io/rest/1/db/files/5422ac3ee4b0b7fdcc760e31/10f120e0-0ffd-42d8-91a5-04df1ca6ac83.SA3.png
GET http://appery.io/app/view/3e4a219b-e1... 404 (Not Found)
The list service is working correctly and has been used elsewhere without a problem.
list service mapping:
The js for the image asset is as follows, this converts the filename to the URL:
pre//get image filename
var imageFilename = value;
console.log('imageFilename = ', imageFilename);
//get image URL
var imageURL = 'https//api.appery.io/rest/1/db/files/5422ac3ee4b0b7fdcc760e31/' + imageFilename;
console.log('imageURL = ', imageURL);
return imageURL;/pre
The console.log lines return the correct value, the the image is not displayed.
Any ideas?