خرید بک لینک

سلام
من از یک ویرایش گر آنلاین استفاده می کنم. که در این ویرایش گر ممکن است عکس هم باشد.
قسمت اپلود آن به درستی کار می کند و فایل اپلود می شود
مشکل من در نمایش فایل های آپلود شده است.

        public ActionResult FroalaUploadImage(HttpPostedFileBase file, int? postId) // نام پارامتر فایل را تغییر ندهید
{
var fileName = Path.GetFileName(file.FileName);
var rootPath = Server.MapPath("~/Views/Shared/cms/");
file.SaveAs(Path.Combine(rootPath, fileName));
//retu Json(new { link = "~/Views/Shared/cms/" + fileName }, JsonRequestBehavior.AllowGet);

//retu Json(new UrlHelper(this.Request.RequestContext).Content(Pat h.Combine(rootPath, fileName)), JsonRequestBehavior.AllowGet);
retu Json(new { link = new UrlHelper(this.Request.RequestContext).Content(Pat h.Combine(rootPath, fileName)) }, JsonRequestBehavior.AllowGet);

}


1.png

اما وقتی آدرس زیر رو می زنم

http://localhost:14041/Views/Shared/cms/download.jpg
این پیغام میده
Server Error in '/' Application.


The resource caot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Views/Shared/cms/download.jpg

برچسب: نویسنده: محمد رضا جوادیان تاريخ: شنبه 15 خرداد 1395 ساعت: 23:23

صفحه بندی