pupsnow / mathmleditor

Automatically exported from code.google.com/p/mathmleditor
1 stars 0 forks source link

Feature request: the server sends back filename and image path #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be very useful if the server returns back the image filename and the 
complete url as a xml output.

In Perl it would be something  like this:

sub mySaveMathImage {

       if($CGI{save}){
               if($CGI{name}){
                       $myFile = $CGI{name};
               } else {
                       $myFile = "myFormula.jpg";
               }
               $img = decode_base64($CGI{image});
               open (fh,">$DATADIR/$myFile");
               print fh $img;
               close fh;
               print <<EOF;
Content-type: text/xml
<?xml version="1.0" encoding="utf-8"?>
<generateimage>
<property id="filename">$myFile</property>
<property id="url">http://mysite.edu/img/$myFile</property>
</generateimage>
EOF
       }else{
               print "Content-Type: image/jpeg\n\n";
               print decode_base64($CGI{image});
       }
return;
}

Original issue reported on code.google.com by claudio....@gmail.com on 24 Sep 2010 at 6:54

GoogleCodeExporter commented 9 years ago

Original comment by ionel.alexandru@gmail.com on 25 Oct 2010 at 1:01

GoogleCodeExporter commented 9 years ago
Hi,

Now, the path is build on the server side and can be absolute or relative.
Let me know if you have problems

Original comment by ionel.alexandru@gmail.com on 3 Nov 2010 at 6:40

GoogleCodeExporter commented 9 years ago
In which format does the server send back the image path?? plain text or xml?

claudio

Original comment by claudio....@gmail.com on 5 Nov 2010 at 10:06

GoogleCodeExporter commented 9 years ago
is plain text

Original comment by ionel.alexandru@gmail.com on 7 Nov 2010 at 3:32

GoogleCodeExporter commented 9 years ago
you can see in the imageCapture.jsp or imageCapture.php

Original comment by ionel.alexandru@gmail.com on 7 Nov 2010 at 3:33