This class contains the meta data for an S3 object.
Exemplo n.º 1
0
 internal static void SetMetadataHeaders(IRequest request, MetadataCollection metadata)
 {
     foreach (var name in metadata.Keys)
         request.Headers[name] = metadata[name];
 }
Exemplo n.º 2
0
        private Metadata ActualMetadata(MetadataCollection m, string versionId, DateTime modified, long size, string contentType, string eTag)
        {
            var metadata = new Metadata(m.Keys.ToDictionary(s => s.Replace("x-amz-meta-", string.Empty), s => m[s]));

            metadata.StoredContentType = contentType;
            metadata.StoredContentLength = size;
            metadata.ETag = eTag;
            metadata.Snapshot = versionId;
            metadata.StoredLastModified = modified;
            if (!metadata.LastModified.HasValue)
            {
                metadata.LastModified = modified;
            }

            return metadata;
        }