BensonHung Member Licensed User Longtime User Oct 27, 2015 #1 HI~Everyone! I have a picture, and I want to transform it to base64, but it shows error 414 when i upload it, how could I solve this problem? thank you!
HI~Everyone! I have a picture, and I want to transform it to base64, but it shows error 414 when i upload it, how could I solve this problem? thank you!
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2015 #2 Can you post the relevant code? Upvote 0
BensonHung Member Licensed User Longtime User Oct 27, 2015 #3 in B4i Code: Copy j.Initialize("UploadSigin", Me) j.PostString("http://192.168.1.180:8081/WebService/ExamUserUploadSigin.aspx",jsonstring) in .net Server Code: Copy string vTitle = ""; string vDesc = ""; string FilePath = Server.MapPath("/file/1.txt"); if (!string.IsNullOrEmpty(Request.Form["title"])) { vTitle = Request.Form["title"]; } if (!string.IsNullOrEmpty(Request.Form["description"])) { vDesc = Request.Form["description"]; } HttpFileCollection MyFileCollection = Request.Files; if (MyFileCollection.Count > 0) { // Save the File MyFileCollection[0].SaveAs(FilePath); } Last edited: Oct 27, 2015 Upvote 0
in B4i Code: Copy j.Initialize("UploadSigin", Me) j.PostString("http://192.168.1.180:8081/WebService/ExamUserUploadSigin.aspx",jsonstring) in .net Server Code: Copy string vTitle = ""; string vDesc = ""; string FilePath = Server.MapPath("/file/1.txt"); if (!string.IsNullOrEmpty(Request.Form["title"])) { vTitle = Request.Form["title"]; } if (!string.IsNullOrEmpty(Request.Form["description"])) { vDesc = Request.Form["description"]; } HttpFileCollection MyFileCollection = Request.Files; if (MyFileCollection.Count > 0) { // Save the File MyFileCollection[0].SaveAs(FilePath); }
Erel B4X founder Staff member Licensed User Longtime User Oct 28, 2015 #4 Maybe you need to set the content type. It is also possible that the server fails to parse the huge json string that is created. Upvote 0
Maybe you need to set the content type. It is also possible that the server fails to parse the huge json string that is created.