lucaspulliese / vue-cool-lightbox

Vue.js lightbox inspired by fancybox.
https://vue-cool-lightbox.lucaspulliese.com
341 stars 54 forks source link

srcMediaType not working on SignedUrl #46

Closed elalekey closed 4 years ago

elalekey commented 4 years ago

Hey, @lucaspulliese , it's me again, xD. If I use a signed Amazon URL with Cloudfront like this...

http://xyz.cloudfront.net/xyz.pdf?Expires=1591994230&Policy=eyJTDXYZBLABLABLABLABLALONGBLABLALIKE5109CHARS&Key-Pair-Id=APKAXYZAMXYZ

and I pass it by property "iframe" or "pdf" this keeps rendering it to me as an image. I tried to use the srcMediaType but nothing, it doesn't work

lucaspulliese commented 4 years ago

Hi again! haha

Try this:

items: [
  {
    src: 'http://xyz.cloudfront.net/xyz.pdf?Expires=1591994230&Policy=eyJTDXYZBLABLABLABLABLALONGBLABLALIKE5109CHARS&Key-Pair-Id=APKAXYZAMXYZ',
    mediaType: 'iframe'
  }
]

I have to update the docs with an example like this one.

elalekey commented 4 years ago

Works.. Love you so much