0
내가 Uploadify에 문제가 :업로드 : 로그인하지 않은 사용자?
내가 사용하여 프로젝트에 로그인 :
FormsAuthentication.SetAuthCookie("myName", false);
을 그리고, 내가 사용하는 일부 파일을 업로드 할 :
@{
tring auth = @Request.Cookies[FormsAuthentication.FormsCookieName]
== null ?
string.Empty
:
Request.Cookies[FormsAuthentication.FormsCookieName].Value;
}
$("#fileuploader").uploadify({
uploader: '@Url.Content("~/Scripts/uploadify.swf")',
script: '@Url.Action("ABF", "Upload")',
scriptData: { token: "@auth" },
fileDataName: 'file',
buttonText: 'Upload file',
multi: false,
sizeLimit: 22222222222,
simUploadLimit: 1,
cancelImg: '@Url.Content("~/Images/uploadify-cancel.png")',
auto: true,
onError: function(event, queueID, fileObj, errorObj) {
$('#file-type-id-list').attr('disabled','');
alert("Error ! Type: [" + errorObj.type + "] Info [" + errorObj.info + "]");
}
});
내 컨트롤러의 액션 :
을[HttpPost]
public ActionResult ABF(HttpPostedFileBase file)
{
bool isLogged = User.Identity.IsAuthenticated;
}
무엇이 궁금합니다. t 방법 인 경우 isLogged
은 false
입니다. 해당 작업을 [HttpGet]
으로 변경하고 정상 요청으로 처리하면 isLogged
은 true
입니다. 왜 ?