mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
[Fixes 7472] Fix for mp4 file not streaming from Azure blob (#7465)
Fixes 7474 By default Azure blob storage uses service version "2009-09-19". mp4 files served with this version have to be fully downloaded to play. More info can be found here http://blog.thoughtstuff.co.uk/2014/01/streaming-mp4-video-files-in-azure-storage-containers-blob-storage/.
This commit is contained in:
parent
c06b2f18a0
commit
4a35e86cae
@ -75,7 +75,14 @@ namespace Orchard.Azure.Services.FileSystems {
|
||||
// Get and create the container if it does not exist
|
||||
// The container is named with DNS naming restrictions (i.e. all lower case)
|
||||
_container = _blobClient.GetContainerReference(ContainerName);
|
||||
|
||||
|
||||
////Set the default service version to the current version "2015-12-11" so that newer features and optimizations are enabled on the images and videos stored in the blob storage.
|
||||
var properties = _blobClient.GetServiceProperties();
|
||||
if (properties.DefaultServiceVersion == null) {
|
||||
properties.DefaultServiceVersion = "2015-12-11";
|
||||
_blobClient.SetServiceProperties(properties);
|
||||
}
|
||||
|
||||
_container.CreateIfNotExists(_isPrivate ? BlobContainerPublicAccessType.Off : BlobContainerPublicAccessType.Blob);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user