Open GoogleCodeExporter opened 9 years ago
Hi,
First step: The image is saved on the server ?
if no, FMath Editor is not configured. Your url is not good
<property id="urlGenerateImage">ckeditor/capture/ImageCapture.aspx</property>
if yes, what is the returned url ?
regards
Original comment by ionel.alexandru@gmail.com
on 9 Jan 2014 at 8:56
The returned url is mentioned in the attatched image.What is the issue i m not
getting it?
Original comment by sahoo6...@gmail.com
on 10 Jan 2014 at 3:20
Attachments:
hmm, this is not the returned url
This is an exception when flash try to save the image on the server.
http://test.imentrance.com/ckeditor/capture/ImageCapture.aspx is ok?
if yes, open the code to understand what is doing.
You need to have a folder for image, ...
Original comment by ionel.alexandru@gmail.com
on 10 Jan 2014 at 5:40
I have the Folder img for images inside Capture Folder.
My Code is as mentioned below see my code and help me out of this stuck:
var image = Request.Params["image"];
if (string.IsNullOrEmpty(image)) return;
var imageContent = Convert.FromBase64String(image);
if (imageContent == null) return;
var save = Request.Params["save"];
var name = Request.Params["name"];
var type = Request.Params["type"];
if (!string.IsNullOrEmpty(save) &&
!string.IsNullOrEmpty(name) &&
(string.Compare(type, "JPG", true) == 0 || string.Compare(type, "PNG", true) == 0))
{
var webappRoot = Server.MapPath("img/");
var fileName = webappRoot + name + "." + type;
using (var outputStream = new BinaryWriter(File.Open(fileName, FileMode.Create)))
{
outputStream.Write(imageContent);
outputStream.Flush();
}
Response.ClearContent();
string cFileName = @"/ckeditor/capture/img/" + name + "." + type;
Response.Write(cFileName);
Response.End();
}
else
{
Response.ContentType = "image/jpeg";
using (var os = Response.OutputStream)
{
for (int i = 0; i < imageContent.Length; i++)
os.WriteByte(imageContent[i]);
os.Flush();
os.Close();
}
}
Original comment by sahoo6...@gmail.com
on 11 Jan 2014 at 6:12
Original issue reported on code.google.com by
sahoo6...@gmail.com
on 9 Jan 2014 at 7:47Attachments: