public string Upload(int number, Stream jpeg) { var name = TemporaryImageName.New(number); using (var file = Storage.Upload.Write(name)) jpeg.CopyTo(file); return(name); }
public static ProductImageName New(TemporaryImageName imageName, ProductName productName) => new ProductImageName(imageName.Number, imageName.Timestamp, productName.Slug);