protected ZipItem GetZipItem(string itemId, Localization localization)
        {
            BinaryMetaFactory binaryMetaFactory = new BinaryMetaFactory();
            BinaryMeta        binaryMeta        = binaryMetaFactory.GetMeta("tcm:" + localization.Id + "-" + itemId);

            if (binaryMeta != null)
            {
                var item = SiteConfiguration.ContentProvider.GetStaticContentItem(binaryMeta.UrlPath, localization);
                return(new ZipItem
                {
                    ContentItem = item,
                    UrlPath = binaryMeta.UrlPath,
                    LocalFileName = GetBinaryLocalFileName(binaryMeta.UrlPath, localization)
                });
            }
            return(null);
        }
Пример #2
0
        => Convert.ToInt32(publicationUri.Split('-')[1]);     // TODO: what about CM URI scheme?

        private static BinaryMeta GetBinaryMeta(string urlPath, string publicationUri)
        {
            BinaryMetaFactory binaryMetaFactory = new BinaryMetaFactory();

            return(binaryMetaFactory.GetMetaByUrl(GetPublicationId(publicationUri), urlPath));
        }
Пример #3
0
        private static BinaryMeta GetBinaryMeta(ILocalization localization, string urlPath)
        {
            BinaryMetaFactory binaryMetaFactory = new BinaryMetaFactory();

            return(binaryMetaFactory.GetMetaByUrl(int.Parse(localization.Id), urlPath));
        }
Пример #4
0
        private static BinaryMeta GetBinaryMeta(ILocalization localization, int binaryId)
        {
            BinaryMetaFactory binaryMetaFactory = new BinaryMetaFactory();

            return(binaryMetaFactory.GetMeta($"{localization.CmUriScheme}:{localization.Id}-{binaryId}"));
        }
 private static BinaryMeta GetBinaryMeta(string urlPath, int publicationId)
 {
     BinaryMetaFactory binaryMetaFactory = new BinaryMetaFactory();
     return binaryMetaFactory.GetMetaByUrl(publicationId, urlPath);
 }