2

I use Kingfisher with swift 3, I displayed my pictures hosted in a directory on my apache server. I just changed for Google Cloud Plateform, and my picture are hosted now in Google Cloud Storage, but I cannot retrieve my picture anymore, the link seems to be correct because when I use it in a browser, I can see the picture (but the url change in the adress bar)

Link Google storage of my picture :

https://storage.cloud.google.com/dirpicturefortest/53141097041434918.jpg

@IBOutlet var profilPictureCollection: [UIImageView]!

let image = self.profilPictureCollection[picture.rank]
let url = URL(string: "https://storage.cloud.google.com/dirpicturefortest/53141097041434918.jpg")
image.kf.setImage(with: url)

The UIImageView stays empty

Anthony
  • 73
  • 1
  • 2
  • 6
  • There's a HTTP 302 for storage.cloud.google.com, you see it if you do `curl -IL "https://storage.cloud.google.com/dirpicturefortest/53141097041434918.jpg"` in the Terminal. I suppose that Kingfisher doesn't know what to do with it - maybe you could open an issue about this on their GitHub. – Eric Aya Jun 11 '17 at 09:45
  • Thanks for your help Eric. So I found the problem, in fact I tried to open the link on my browser where I was authenticated! I didn't add public permission on my google bucket! Now it works. – Anthony Jun 11 '17 at 16:17
  • Ah! That makes sense. Thanks for the feedback. – Eric Aya Jun 11 '17 at 16:23

0 Answers0