1
ImageResizerを使用してファイルシステムに画像を保存し、画像URLをDBに保存する予定です。私は何度も何度もAPIを介して行っているが、DBのURLに含める新しく作成されたファイル名を取得する明白な方法を見つけることができません。ここから新しい画像ファイル名の取得方法
foreach (string fileKey in HttpContext.Current.Request.Files.Keys)
{
HttpPostedFile file = HttpContext.Current.Request.Files[fileKey];
if (file.ContentLength <= 0) continue; //Skip unused file controls.
ImageJob i = new ImageJob(file, "~/eventimages/<guid>_<filename:A-Za-z0-9>.<ext>",
new ResizeSettings("width=200&height=133&format=jpg&crop=auto"));
i.Build();
}
偉大な、リンクありがとう! :) – IrishChieftain