php - Getting broken images from blob storage in Azure websites -
my php code seems correct, (the part talks blob storage).
//talk blob storage, links, based on file name $storageclient = $this->azure->get_blob_storage(); foreach($result $photo) { $sharedaccessurl[] = $storageclient->generatesharedaccessurl( 'container', $photo['file'], 'b', 'r', $storageclient ->isodate(time()), $storageclient ->isodate(time() + 3000) ); } foreach($sharedaccessurl $item) { $pictures[] = $item; }
this gets absolute url links, store inside array, pass view , retrieve images. this:
<img src="<?php echo $pictures[$i]; ?>" height=100px width="100px"> (where pictures[$i] = http://azure blobstorage etc...
on local machine, everytime refresh page, or flick through pages there images, load fine. however, when upload app onto azure web-sites, broken images, , need "refresh page" every time happens image appear. despite link image being correct, after click on inspect element on div image suppose appear.
i using "shared version" of azure web sites 3 month trial. php version same local machine, along .net framework.
does have idea why happening?
i have checked logs not helpful.
solution:
there seems delay times set @ blob storage , azure web sites.
$storageclient ->isodate(time()-60), $storageclient ->isodate(time() + 3000)
add -60 first line. , should work.
looks answered own question. it's not delay clock-drift , time synchronization between compute nodes , storage nodes. it's idea set start time minute or 2 prior when want link begin working (assuming intend link work "right now"). no harm start-time going back-in-time.
Comments
Post a Comment