WCS Image Path In Server

Hi all
I have a wcs installed with Every thing functioning properly.I am trying to see the path on which the floor plan get stored in the server.
I would like to know that "is it possible to take the floorplan from the server" or "where is the image get stored in the server while uploading maps".
I had seen in webnms-->Map image folder.But the folder is empty.
Regards
Danish

Hi Danish:
The maps are stored under /webnms/webacs/images/domainmaps
When WCS is stopped, yes, it would be possible to copy/paste those files from that directory to some other, but I wouldn't recommend removing them or doing this while WCS is live.
Sincerely,
Rollin Kibbe
Network Management Systems Team

Similar Messages

  • Getting image path from database( Remote server)  & display in jsp page

    hai frnds,
    i have one doudt regarding in my web application Development
    . I want to Getting image path from database( **Remote server**) & display in jsp page here iam forwarding my control through Servlets
    how this will passiable
    Thanks in Advance
    SonyKamesh
    [email protected]

    hai
    I think ur doubt will be...
    1) Getting a Image From Remote Server( & U stored a only path name in Data Base)
    2) Image r stroed in saparate Drive( Not in Webroot-- where u Created domine )
    Please Any Help Will be Appriciated
    [email protected]
    Edited by: Sonykamesha on Dec 18, 2007 11:02 PM

  • Image path not storing in sql database

    Hello,
    I have read here on the forum how to upload an image to server and store path in  your database, the image uploads correctly to the correct folder on my server but the image path does not get stored on my sql database (not local hosting). I receive the error: The file has been uploaded, and your information has been added to the directory. Column 'image' cannot be null.
    My database has the following columns:
    id
    datum
    image
    sectie
    My code is as follows:
    <?php require_once('Connections/dbTroch.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_dbTroch, $dbTroch);
    $query_rs_aanbod = "SELECT * FROM tblSlideshow ORDER BY id ASC";
    $rs_aanbod = mysql_query($query_rs_aanbod, $dbTroch) or die(mysql_error());
    $row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
    $totalRows_rs_aanbod = mysql_num_rows($rs_aanbod);
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    $target = "images/slides/";  //This is the directory where images will be saved// 
    $target = $target . basename( $_FILES['image']['name']); //change the image and name to whatever your database fields are called//
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add-photos-aanbod")) {
      $insertSQL = sprintf("INSERT INTO tblSlideshow (image, sectie) VALUES (%s, %s)",
                           GetSQLValueString($_POST['file'], "text"),
                           GetSQLValueString($_FILES['image']['name'], "text"));
    //This code writes the photo to the server//
    if(move_uploaded_file($_FILES['image']['tmp_name'], $target))
    //And confirms it has worked//
    echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
    else {
    //Gives error if not correct//
    echo "Sorry, there was a problem uploading your file.";
      mysql_select_db($database_dbTroch, $dbTroch);
      $Result1 = mysql_query($insertSQL, $dbTroch) or die(mysql_error());
    ?>
    <!doctype html>
    <html>
    <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Troch Project Solutions - Admin - Toevoegen</title>
      <link rel="stylesheet" href="css/foundation.css" />
      <link rel="stylesheet" href="css/layout.css" />
      <!-- Fonts
      ================================================== -->
      <script type="text/javascript" src="//use.typekit.net/vob8gxg.js"></script>
      <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
      <!-- jQuery
      ================================================== -->
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
      <script src="js/vendor/modernizr.js"></script>
    </head>
    <body>
        <div class="row">
          <div class="large-8 medium-8 small-8 large-centered medium-centered small-centered columns intro">
              <h2 class="subheader text-center">Admin</h2>
              <p><a>Log uit</a></p>
              <p><a href="admin.php">Terug naar Admin menu</a>
              <h4>image toevoegen naar aanbod slideshows:</h4>
              <form action="<?php echo $row_rs_aanbod['']; ?>" method="POST" name="add-photos-aanbod" id="add-photos-aanbod" enctype="multipart/form-data">
              <table>
                    <tbody>
                         <tr>
                              <td><label for="image">Kies foto:</label></td>
                              <td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
                        <tr>
                              <td>Sectie:</td>
                              <td><select name="sectie" id="sectie" option value="sectie">
                                <?php
    do { 
    ?>
                                <option value="<?php echo $row_rs_aanbod['sectie']?>"><?php echo $row_rs_aanbod['sectie']?></option>
                                <?php
    } while ($row_rs_aanbod = mysql_fetch_assoc($rs_aanbod));
      $rows = mysql_num_rows($rs_aanbod);
      if($rows > 0) {
          mysql_data_seek($rs_aanbod, 0);
          $row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
    ?>
                              </select></td> 
                        </tr>
                        <tr>
                            <td><input type="Submit" name="Add" id="add" value="Toevoegen" /></td>
                        </tr>
                </tbody>
            </table>
            <input type="hidden" name="MM_insert" value="add-photos-aanbod" />
        </form>
          </div><!-- end large-8 -->
        </div><!-- end row -->
    <script src="js/vendor/jquery.js"></script>
    <script src="/js/vendor/fastclick.js"></script>
    <script src="js/foundation.min.js"></script>
    <script>
                $(document).foundation();
            </script>
    </body>
    </html>
    <?php
    mysql_free_result($rs_aanbod);
    ?>
    I cannot work out what is wrong and I would appreciate any help on this. Thanks

    Your form field and array variable names do not match
    <td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
    GetSQLValueString($_POST['file'], "text"),

  • How to Uplaod Image in BW Server(Images to be used in creation of web appli

    Hi All,
    How can we upload images in BW server, which can be used  in creation of web application which will contain the links to the super user utilities such as super queries and help documentation.
    Regrads
    Premanshu

    Hi,
    Goto SE80-> Mime repository ->SAP ->BW->Customer -> Images -> Right click ->Create mime object -> Show path from local computer and its done .
    After importing image remember to log off and log on from WAD in order to see imported image and include it in the object.
    Hope that helps.
    Regards
    Mr Kapadia

  • LinkListExplorer iview BackGround Image path not working

    HI All ,
    As i am using Layout set LinkListExplorer for few external links , when i am giving image name for eg growth.jpg in  background image path,  which is placed at /etc/public/mimes/images it is not showing anything , the same is working for NewsBrowser Layout set  . I have tried many thing all possiblities but no success .
    Pls help me in this regard.
    Shwetang saxena

    Hi Vedant,
    APEX only replaces the #WORKSPACE_IMAGES# variable within APEX itself. This is quite logical, because what you see in the APEX developer space is generated by PL/SQL from the database, so APEX can change what it wants. APEX can't access the files however, that's logical to because APEX would need premissions on the server and an Oracle directoryto start doing changes to files.
    So if you want to point to the image directory in the CSS file you need to provide the full path.
    Regards,
    Joni

  • How can I redirect an image path outside a Web Application ?

    Hi,
    I think this is a quite simple question but I didn't find the precise answer on these forums.
    I've deployed a WLP test portal 8.1, whose URL is http://host:7001/portalApp/, and my images are located here http://host:7001/portalApp/images/
    In fact in my portal, a javascript located on another server references an URL which is http://host:7001/images/image.gif (I can't modify the script, but it takes the root /images/ path of the current server)
    On the Weblogic server I would like to redirect the path /images to my /portalApp/images in order to display correctly the image.
    I don't want to setup an Apache server just for this, and I believe there's an easier solution than to write a redirect servlet. I've red it is possible to modify the application.xml context-root but I don't know what to do precisely, I tried this :
    <module>
    <web>
    <web-uri>/images</web-uri>
    <context-root>/portalApp/images</context-root>
    </web>
    </module>
    but it doesn't work...
    Thanks for your help.
    BV

    Hi,
    I am facing the same problem and looks this could be a solution.
    I tried the approach but I get this error:
    java.net.SocketException: Socket Closed
    at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:177)
    at java.net.Socket.setTcpNoDelay(Socket.java:771)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:306)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:355)
    at weblogic.net.http.HttpClient.<init>(HttpClient.java:139)
    at weblogic.net.http.HttpClient.New(HttpClient.java:212)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:14
    0)
    at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.
    java:319)
    at weblogic.net.http.SOAPHttpURLConnection.getInputStream(SOAPHttpURLCon
    nection.java:28)
    at java.net.URL.openStream(URL.java:913)
    at weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityMan
    ager.java:836)
    at weblogic.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntity
    Manager.java:796)
    <06-Dec-2006 21:44:17 o'clock GMT> <Warning> <Deployer> <BEA-149004> <Failures w
    ere detected while initiating Deploy task for application appsdirimages_war.>
    Looks like I am missing some thing, say a servlet there.
    Could you please explain how you got the images working?
    Regards
    Ashish

  • Storing Uploaded Image Path into Mysql

    Hi I am developing a cms and am using the code David gives in his book PHP Solutions,  everything works fine but I can't work out how to extract the uploaded path so that it is stored in my table.
    Help would be really appreciated, I am making good progress in learning the php especially with David's books but am still struggling when it comes to having to customized the code.
    The code for the upload.php is as follows,
    <?php
    class Gp1_Upload{
      protected $_uploaded = array();
      protected $_destination;
      protected $_max = 51200;
      protected $_messages = array();
      protected $_permitted = array('image/gif',
                                    'image/jpeg',
                                    'image/pjpeg',
                                    'image/png');
      protected $_renamed = false;
      public function __construct($path) {
        if (!is_dir($path) || !is_writable($path)) {
          throw new Exception("$path must be a valid, writable directory.");
        $this->_destination = $path;
        $this->_uploaded = $_FILES;
      public function getuploadpath (){
      public function getMaxSize() {
        return number_format($this->_max/1024, 1) . 'kB';
      public function setMaxSize($num) {
        if (!is_numeric($num)) {
          throw new Exception("Maximum size must be a number.");
        $this->_max = (int) $num;
      public function move($overwrite = false) {
        $field = current($this->_uploaded);
        if (is_array($field['name'])) {
          foreach ($field['name'] as $number => $filename) {
            // process multiple upload
            $this->_renamed = false;
            $this->processFile($filename, $field['error'][$number], $field['size'][$number], $field['type'][$number], $field['tmp_name'][$number], $overwrite);   
        } else {
          $this->processFile($field['name'], $field['error'], $field['size'], $field['type'], $field['tmp_name'], $overwrite);
      public function getMessages() {
        return $this->_messages;
      protected function checkError($filename, $error) {
        switch ($error) {
          case 0:
            return true;
          case 1:
          case 2:
            $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
            return true;
          case 3:
            $this->_messages[] = "Error uploading $filename. Please try again.";
            return false;
          case 4:
            $this->_messages[] = 'No file selected.';
            return false;
          default:
            $this->_messages[] = "System error uploading $filename. Contact webmaster.";
            return false;
      protected function checkSize($filename, $size) {
        if ($size == 0) {
          return false;
        } elseif ($size > $this->_max) {
          $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
          return false;
        } else {
          return true;
      protected function checkType($filename, $type) {
        if (empty($type)) {
          return false;
        } elseif (!in_array($type, $this->_permitted)) {
          $this->_messages[] = "$filename is not a permitted type of file.";
          return false;
        } else {
          return true;
      public function addPermittedTypes($types) {
        $types = (array) $types;
        $this->isValidMime($types);
        $this->_permitted = array_merge($this->_permitted, $types);
      protected function isValidMime($types) {
        $alsoValid = array('image/tiff',
                           'application/pdf',
                           'text/plain',
                           'text/rtf');
          $valid = array_merge($this->_permitted, $alsoValid);
        foreach ($types as $type) {
          if (!in_array($type, $valid)) {
            throw new Exception("$type is not a permitted MIME type");
      protected function checkName($name, $overwrite) {
        $nospaces = str_replace(' ', '_', $name);
        if ($nospaces != $name) {
          $this->_renamed = true;
        if (!$overwrite) {
          $existing = scandir($this->_destination);
          if (in_array($nospaces, $existing)) {
            $dot = strrpos($nospaces, '.');
            if ($dot) {
              $base = substr($nospaces, 0, $dot);
              $extension = substr($nospaces, $dot);
            } else {
              $base = $nospaces;
              $extension = '';
            $i = 1;
            do {
              $nospaces = $base . '_' . $i++ . $extension;
            } while (in_array($nospaces, $existing));
            $this->_renamed = true;
        return $nospaces;
      protected function processFile($filename, $error, $size, $type, $tmp_name, $overwrite) {
        $OK = $this->checkError($filename, $error);
        if ($OK) {
          $sizeOK = $this->checkSize($filename, $size);
          $typeOK = $this->checkType($filename, $type);
          if ($sizeOK && $typeOK) {
            $name = $this->checkName($filename, $overwrite);
            $success = move_uploaded_file($tmp_name, $this->_destination . $name);
            if ($success) {
                $message = "$filename uploaded successfully";
                if ($this->_renamed) {
                  $message .= " and renamed $name";
                $this->_messages[] = $message;
            } else {
              $this->_messages[] = "Could not upload $filename";
    ?>
    The code for my form page is this
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <?php
    //THE FOLLOWING CODE IS FOR THE UPLOADING OF IMAGES AND FILES
    // set the max upload size in bytes
    $max = 51200;
    if (isset ($_POST ['submit']))
                //define the path to the upload folder
                $destination = 'uploads/';
                require_once('classes/Upload.php');
                try {
                    $upload = new Gp1_Upload($destination);
                    $upload->setMaxSize($max);
                    $upload->move();
                    $result = $upload->getMessages();
                } catch (Exception $e) {
                    echo $e->getMessage();
    // END OF UPLOADING OF IMAGES AND FILES
    ?>
    <form id="newvenue" action="" method="post" enctype="multipart/form-data" >
          <?php
               // THIS CODE DISPLAYS ERROR MESSAGES FOR THE FILE UPLOADS
              if (isset($result)){
              echo '<ul>';
              foreach ($result as $message){
                  echo "<li>$message</li>";
              echo '</ul>';
           ?>
      <table id="neweventdisplay" cellpadding="5"  border="0">
        <tr>
      <td></td>
      <td><input type="hidden" name="user_id"  value="" /></td>
      </tr>
      <tr>
      <td></td>
        <td>Organisers Name</td>
        <td><input class="input80px" id="org_name" name="org_name" type="text" /> </td>
      </tr>
      <tr>
      <td></td>
      <td><label for="image">Upload image:</label></td>
      <td><p>
    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max; ?>" />
    <input type="file" name="image" id="image" />
    </p></td>
    </tr>
      <tr>
      <td></td>
      <td>Details about your upload</td>
      <td><input class="input80px" id="org_uploadcapt" name="org_uploadcapt" type="text"  /></td>
    </tr>
      <tr>
      <td></td>
      <td><input type="submit" name="submit" id="submit" value="upload"></td>
      </tr>
      <tr>
      <td class="heading"> </td>
      <td></td>
      </tr>
    </table>
    </form>
    <prep>
    <?php
    if (isset ($_POST ['submit'])){
        print_r($_FILES);}
        ?>
        </prep>
    </body>
    </html>

    Hi David
    Thank you very much for your help.  I had continued to work on the code and had worked out how to input the image path into the database but it was using the original filename, so when every it is changed it did not work.  The code in my page at that point was the following,
    <?php     // 2. NEW USER REGISTRATION<br />
            include_once ("includes/form_functions.inc.php");
            $max = 100000;
            $destination = 'uploads/';
            // START FORM PROCESSING FOR A NEW REGISTRATION
            if (isset($_POST['submit'])) { // Form has been submitted.
            $errors = array();
            // perform validations on the form data
            $required_fields = array('org_name');
            $errors = array_merge($errors, check_required_fields($required_fields, $_POST));    
            $required_numberfields = array('user_id');
            $errors = array_merge($errors, check_number_fields($required_numberfields, $_POST));
            $fields_with_lengths = array('org_name' => 36, 'org_website' => 100, 'org_contact' => 40,  'org_conemail' => 80, 'org_contel' => 30);
            $errors = array_merge($errors, check_max_field_lengths($fields_with_lengths, $_POST));
            /*Here I am using trim as well as ucwords, this function converts the first letter of each work into a capital letter,  I am using this only on the
            firstname and surname to ensure that the data is how I want it as it is going  into the database,  The better the data is preformated the better the data
            swill be within the database.*/
            $org_name = trim(strtolower(mysql_prep($_POST['org_name'])));
            $org_website = trim(strtolower(mysql_prep($_POST['org_website'])));
            $org_contact = trim(strtolower (mysql_prep($_POST['org_contact'])));
            $org_conemail = trim(strtolower (mysql_prep($_POST['org_conemail'])));
            $org_contel = strtolower (mysql_prep($_POST['org_contel']));
            $userid = $_POST['user_id'];
            $org_uploadcapt = $_POST['org_uploadcapt'];
            $image = $_FILES['image'];
            /*Here is the code that takes the variable captured from the input form and matches it  up with the appropriate field in the database.  An important point with insertion is that  the variables are in the same order as the mysql field names, there will be an error if the number of variables does not match the number of field names.  Note that there is no entry for the user id as this is an auto increment file within mysql and so is not needed to be entered*/
            if ( empty($errors) ) {
                $sql = "INSERT INTO organiser
                          (org_name, org_website, org_contact, org_conemail, org_contel, user_id, org_uploadurl, org_uploadcapt)
                          VALUES
                          ('{$org_name}', '{$org_website}', '{$org_contact}', '{$org_conemail}', '{$org_contel}', '{$userid}', '{$destination}".$image['name']."', '{$org_uploadcapt}' )";
                $result = mysql_query($sql, $connection);
                if ($result) {
                    $message = "The organiser was successfully created.<br />";
                } else {
                    $message = "I am sorry but the organiser could not be added.";
                    $message .= "<br />" . mysql_error();
                } else {
                    /* this counts the number of errors and informs the user of how many fields were
                    incorrectly entered*/
                if (count($errors) == 1) {
                    $message = "There was 1 error in the form.";
                } else {
                    $message = "There were " . count($errors) . " errors in the form.";
        } else { // Form has not been submitted.
            $org_name = "";
            $org_website = "";
            $org_contact = "";
            $org_conemail = "";
            $org_contel = "";
            $userid = "";
            $org_uploadcapt = "";
    //THE FOLLOWING CODE IS FOR THE UPLOADING OF IMAGES AND FILES
    // set the max upload size in bytes
    if (isset ($_POST ['submit']))
                //define the path to the upload folder
                // Use This On The Local Hosting Machine
                //$destination = 'C:/upload_test/';
                // Use This On The Live Server
                require_once('classes/Upload.php');
                try {
                    $upload = new Gp1_Upload($destination);
                    $upload->setMaxSize($max);
                    $upload->move();
                    $result = $upload->getMessages();
                } catch (Exception $e) {
                    echo $e->getMessage();
    // END OF UPLOADING OF IMAGES AND FILES
    ?>
    <title>Horse Events</title>
    <?php include_once("includes/meta.inc.php");?>
    <?php include_once("includes/cssfavgoogle.inc.php");?>
    <link href="css/adminpanel.css" rel="stylesheet" type="text/css" />
    <style>
    input[type="number"] {
        width:40px;
    </style>
    </head>
    <body>
    <div id="wrapper">
        <div id="admincontent">
    <form id="newvenue" action="neworganiser.php" method="post" enctype="multipart/form-data" >
          <?php if (!empty ($message)) {echo "<p class=\"message\">" . $message . "</p>";} ?>
          <?php if (!empty ($errors)) {display_errors($errors); } ?>
          <?php
              // THIS CODE DISPLAYS ERROR MESSAGES FOR THE FILE UPLOADS
              if (isset($result)){
              echo '<ul>';
              foreach ($result as $message){
                  echo "<li>$message</li>";
              echo '</ul>';
           ?>
    <br />
          <table id="neweventdisplay" cellpadding="5"  border="0">
        <tr>
      <td></td>
      <td><input type="hidden" name="user_id"  value="<?php echo $url_userid ['user_id']; ?>" /></td>
      </tr>
      <tr>
      <td> <span class="compuls">*</span></td>
        <td>Organisers Name</td>
        <td><input class="input80px" id="org_name" name="org_name" type="text" />
         </td>
      </tr>
          <tr>
          <td><span class="compuls">*</span></td>
        <td>Their Website</td>
        <td><input class="input80px" id="org_website" name="org_website" type="text" /></td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
        <td>Organisers Contact</td>
        <td><input id="org_contact" name="org_contact" type="text" />eg: Mrs Jean Kelly</td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
        <td>Contact Email</td>
        <td><input class="input80px" id="org_conemail" name="org_conemail" type="text" />
          </td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
      <td>Contact Tel No.</td>
      <td><input id="org_contel" name="org_contel" type="text" /></td>
      </tr>
      <tr>
      <td></td>
      <td><label for="image">Upload image:</label></td>
      <td><p>
    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max; ?>" />
    <input type="file" name="image" id="image" />
    </p></td>
    </tr>
      <tr>
      <td></td>
      <td>Details about your upload</td>
      <td><input class="input80px" id="org_uploadcapt" name="org_uploadcapt" type="text"  /></td>
    </tr>
      <tr>
      <td></td>
      <td><input type="submit" name="submit" id="submit" value="Add Your Organiser"></td>
      </tr>
      <tr>
      <td class="heading"> </td>
      <td></td>
      </tr>
    </table>
    <a  class="delete" href="controlpanel.php">Cancel</a>
    </form>
        </div>
    I have added the code you kindly forwarded but am getting an error,  I am still trying to learn the basics of php and am unsure of what to do next, my php Upload.php now looks like
    <?php
    class Gp1_Upload{
      protected $_uploaded = array();
      protected $_destination;
      protected $_max = 100000;
      protected $_messages = array();
      protected $_permitted = array('image/gif',
                                    'image/jpeg',
                                    'image/pjpeg',
                                    'image/png');
      protected $_renamed = false;
      protected $_filenames = array();
      public function __construct($path) {
        if (!is_dir($path) || !is_writable($path)) {
          throw new Exception("$path must be a valid, writable directory.");
        $this->_destination = $path;
        $this->_uploaded = $_FILES;
      public function getMaxSize() {
        return number_format($this->_max/100000, 1) . 'kB';
      public function setMaxSize($num) {
        if (!is_numeric($num)) {
          throw new Exception("Maximum size must be a number.");
        $this->_max = (int) $num;
      public function move($overwrite = false) {
        $field = current($this->_uploaded);
        if (is_array($field['name'])) {
          foreach ($field['name'] as $number => $filename) {
            // process multiple upload
            $this->_renamed = false;
            $this->processFile($filename, $field['error'][$number], $field['size'][$number], $field['type'][$number], $field['tmp_name'][$number], $overwrite);   
        } else {
          $this->processFile($field['name'], $field['error'], $field['size'], $field['type'], $field['tmp_name'], $overwrite);
      public function getMessages() {
        return $this->_messages;
      protected function checkError($filename, $error) {
        switch ($error) {
          case 0:
            return true;
          case 1:
          case 2:
            $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
            return true;
          case 3:
            $this->_messages[] = "Error uploading $filename. Please try again.";
            return false;
          case 4:
            $this->_messages[] = 'No file selected.';
            return false;
          default:
            $this->_messages[] = "System error uploading $filename. Contact webmaster.";
            return false;
      protected function checkSize($filename, $size) {
        if ($size == 0) {
          return false;
        } elseif ($size > $this->_max) {
          $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
          return false;
        } else {
          return true;
      protected function checkType($filename, $type) {
        if (empty($type)) {
          return false;
        } elseif (!in_array($type, $this->_permitted)) {
          $this->_messages[] = "$filename is not a permitted type of file.";
          return false;
        } else {
          return true;
      public function addPermittedTypes($types) {
        $types = (array) $types;
        $this->isValidMime($types);
        $this->_permitted = array_merge($this->_permitted, $types);
      protected function isValidMime($types) {
        $alsoValid = array('image/tiff',
                           'application/pdf',
                           'text/plain',
                           'text/rtf');
          $valid = array_merge($this->_permitted, $alsoValid);
        foreach ($types as $type) {
          if (!in_array($type, $valid)) {
            throw new Exception("$type is not a permitted MIME type");
      protected function checkName($name, $overwrite) {
        $nospaces = str_replace(' ', '_', $name);
        if ($nospaces != $name) {
          $this->_renamed = true;
        if (!$overwrite) {
          $existing = scandir($this->_destination);
          if (in_array($nospaces, $existing)) {
            $dot = strrpos($nospaces, '.');
            if ($dot) {
              $base = substr($nospaces, 0, $dot);
              $extension = substr($nospaces, $dot);
            } else {
              $base = $nospaces;
              $extension = '';
            $i = 1;
            do {
              $nospaces = $base . '_' . $i++ . $extension;
            } while (in_array($nospaces, $existing));
            $this->_renamed = true;
        return $nospaces;
      protected function processFile($filename, $error, $size, $type, $tmp_name, $overwrite) {
        $OK = $this->checkError($filename, $error);
        if ($OK) {
          $sizeOK = $this->checkSize($filename, $size);
          $typeOK = $this->checkType($filename, $type);
          if ($sizeOK && $typeOK) {
            $name = $this->checkName($filename, $overwrite);
            $success = move_uploaded_file($tmp_name, $this->_destination . $name);
            if ($success) {
                $message = "$filename uploaded successfully";
                if ($this->_renamed) {
                  $message .= " and renamed $name";
                $this->_messages[] = $message;
            } else {
              $this->_messages[] = "Could not upload $filename";
      public getFilenames() {
        return $this->_filenames;
    ?>
    The error is Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE.   
    I have not worked with oop before and have only very briefly looked at the principle was on my foundation degree.

  • Retrieving Invoice images from Content Server

    Background
    My problem is, that I need to retrieve images from the Content Server and save them on a local drive with a path provided by the user. Metadata that is available for the image includes Object ID and the URL to the image on the server.
    However, the Object ID is not valid for DMS, so the Function Groups for this are invalid. The cl_gui_* function groups have several usable Function Modules, but the URL link provided for the image is something like this:
    http://xxxxxx.xxxxxx.com:XXXX/ContentServer/ContentServer.dll?get&pVersion=0046&contRep=Z2&docId=123AB1C123D12E12345.... etc.
    What makes the cl_gui FM unable to work, is the :, ?, % and & characters in the string - which makes the FMs look at the URL as invalid.
    I have also tried more or less the entire content of FM in the SCMS_* Function Group (containing FMs for the Content Server), but to no avail.
    Question
    So, now to my question: Is there any way to translate the URL provided so the cl_gui FMs can understand it? Or, should I go the other way around and fetch the Invoice Image using the provided Object ID?
    All needed at my program to finish off, is a method to retrieve the given images and save them to a local path.
    I hope the Guru's of the SDN will be able to help me here
    regards
    Anders Haugbølle
    Edited by: Anders Haugbølle on Feb 4, 2009 12:53 PM

    Moving this thread from ERP MM to [Enterprise Resource Planning (ERP) |Enterprise Resource Planning (SAP ERP);

  • Image path sets ( servername) instead of \\servername

    Due to a hardware meltdown I have had to rip the NW server out of the tree
    and install a new one.
    I have re-installed the server NW65sp8 and reinstalled ZENworks for Desktops
    7
    Now, When I set an imaging job on a workstation I browse to the server etc
    and set the file path.
    When I click apply or ok leave the object and go back in the path has
    changed;
    eg
    (ZFDSRVSR) USER\zenimg\ws_master.zmg
    instead of
    \\ZFDSRVSR\USER\zenimg\ws_master.zmg
    Any ideas on how I fix this?
    Manual imaging works ok. I have deleted the ws object and re imported into
    eDir
    Tom

    I have resolved this.
    >>> On 21/07/2010 at 12:54 p.m., in message
    <[email protected]>,
    Tom Cummings<[email protected]> wrote:
    > This is turning out to be serious ant not server related. I installed a
    > new
    > ZFD7 server into a new container. Setting an image path on using that
    > server reproduces the same problem.
    >
    > Help! :‑(
    >
    >
    >
    >>>> On 20/07/2010 at 9:07 AM, in message
    > <[email protected]>,
    > Tom Cummings<[email protected]> wrote:
    >> Due to a hardware meltdown I have had to rip the NW server out of the
    >> tree
    >> and install a new one.
    >>
    >> I have re‑installed the server NW65sp8 and reinstalled ZENworks for
    >> Desktops
    >> 7
    >>
    >> Now, When I set an imaging job on a workstation I browse to the server
    >> etc
    >> and set the file path.
    >>
    >> When I click apply or ok leave the object and go back in the path has
    >> changed;
    >>
    >> eg
    >>
    >> (ZFDSRVSR) USER\zenimg\ws_master.zmg
    >>
    >> instead of
    >>
    >> \\ZFDSRVSR\USER\zenimg\ws_master.zmg
    >>
    >> Any ideas on how I fix this?
    >>
    >> Manual imaging works ok. I have deleted the ws object and re imported
    >> into
    >> eDir
    >>
    >> Tom

  • Display image from image path (ASP)

    Help needed please. Sorry if the topic has already been
    discussed. I did a search but it returned nothing.
    My problem.
    I can display images on my website by choosing the datasource
    and the image path from by database. No issues here. What I want is
    to be able to open up a larger image by clicking on this image.
    I created another page. On this page is an image placeholder.
    The source again is the datasource with the image path to a larger
    image. I used a behaviour to open this page however, it shows the
    same image (the 1st record in my recordset) whichever image you
    click on my origianl page.
    Can someone please tell me how to do it? It would be
    appreciated.

    I'm assuming that you are using a repeat region to display
    the original
    images.
    You will need to pass the Primary Key to the new page, and
    filter the
    recordset on the new page based on that Primary Key.
    For example, this would be the link to the new page:
    <a
    href="page2.asp?ID=<%=(rsImages.Fields.Item("ImageID").Value)%>"
    Then on the new page filter the recordset SQL based on the
    ImageID,
    something like this:
    <%
    Dim rsImage__MMColParam
    rsImage__MMColParam = "1"
    If (Request.QueryString("ID") <> "") Then
    rsImage__MMColParam = Request.QueryString("ID")
    End If
    %>
    <%
    Dim rsImage
    Dim rsImage_cmd
    Dim rsImage_numRows
    Set rsImage_cmd = Server.CreateObject ("ADODB.Command")
    rsImage_cmd.ActiveConnection = MM_connImage_STRING
    rsImage_cmd.CommandText = "SELECT * FROM tblImages WHERE
    ImageID = ?"
    rsImage_cmd.Prepared = true
    rsImage_cmd.Parameters.Append
    rsImage_cmd.CreateParameter("param1", 5,
    1, -1, rsImage__MMColParam) ' adDouble
    Set rsImage = rsImage_cmd.Execute
    rsImage_numRows = 0
    %>
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com
    "leeweatherill" <[email protected]> wrote in
    message
    news:ft00gm$spm$[email protected]..
    > Help needed please. Sorry if the topic has already been
    discussed. I did a
    > search but it returned nothing.
    >
    > My problem.
    > I can display images on my website by choosing the
    datasource and the
    > image
    > path from by database. No issues here. What I want is to
    be able to open
    > up a
    > larger image by clicking on this image.
    >
    > I created another page. On this page is an image
    placeholder. The source
    > again
    > is the datasource with the image path to a larger image.
    I used a
    > behaviour to
    > open this page however, it shows the same image (the 1st
    record in my
    > recordset) whichever image you click on my origianl
    page.
    >
    > Can someone please tell me how to do it? It would be
    appreciated.
    >

  • Image path broken after 4.1 to 4.2 upgrade

    Hi,
    Just upgraded several instances from 4.1 to 4.2.1. Running apex listener 2.0.0.354.17.05 on glassfish 3.1.2.2. Our db is 11.2.0.3.0 on centos 2.6.32-279.9.1.el6.x86_64
    One of our upgrades has a very unusual problem. Our applications all run fine, but the builder screens are blank, or at least appear blank. The page source looks normal in a browser except we find that the image paths are all malformed. They are all missing the trailing '/' after the 'i' of the images directory. For example, the builder login page has the following image reference:
    https://ourorg.org/iapex_ui/apexlogo.png
    which should be
    https://dev.insitehome.org/i/apex_ui/apexlogo.png
    If I type in the correct url, the image is viewable, so I doubt there is any issue with the server location or version of the images. Apex SEEMS to be generating the wrong path for the images.
    Any suggestions?
    Thanks,
    Steve

    stevepence wrote:
    Ok, it seems pretty obvious what happend. Instead of
    @apxrtins.sql SYSAUX SYSAUX TEMP /i/I dropped that trailing slash after the "i".
    Hopefully someone can tell me where in the apex meta data to correct that without reinstalling. Run the script <tt>/apex/utilities/reset_image_prefix.sql</tt>, but make sure they've fixed Re: 4.2 reset image prefix sql error. If not, apply the workaround before you start.

  • In MIRO transaction, Where will be the image path get stored?

    Dear Friends,
    In MIRO transaction, Where will be the image path get stored?
    There must be some standard tables/functionality which is maintaining PATH. Please help me to find out the Document Path Details..
    Thanks in Advance.
    Regards,
    Lijo

    Hi,
    this is the content of the oss note (hope it helps):
    Symptom
    Where are the documents that you can create and display using the generic object services (System -> Connections or System -> 'Services for the object') physically stored?
    Solution
    Storing attachments using generic services
    The generic object services offer a separate option via the 'Copy desktop document', 'Connect Internet address (URL)' and 'Create a note' services to add an attachment to a business document.As of Release 4.6C, these services are called 'Create attachment', 'Create an external document (URL)' and 'Create a note'.
    These services should enable the end user to easily enter attachments without document characters (memos).Correspondingly, there is no archiving concept for this type of attachment.
    Technically speaking, notes, PC attachments and URLs are treated as SAPoffice documents and result in corresponding entries in the SOOD and SOFM tables. The contents of the attachments are stored in the SOC3 table.As of Release 4.6B, the contents of PC attachments are stored using the Knowledge Provider (KPro).The KPro allows you to connect an external storage system so that the contents of the PC attachments no longer place a burden on the database. If an external storage system is not connected, the contents of the PC attachments are written to the SOFFCONT1 table as of Release 4.6B.The administrative information necessary to locate the document in the Kpro is in the SOC3 table.
    The content of notes and URLs continues to be stored in the SOC3 table.As these documents are usually small, the additional effort involved in storing them in the KPro is not justified.
    If the PC attachments are not to be stored in the SOFFCONT1 table, you must assign a category to the SOFFPHIO document class using transaction SKPR08. The category is created in transaction OACT and refers to a repository on a HTTP content server. If documents that have already been stored are to be moved to the content server, see note 389366.
    For more information on connecting an external Content Server, see the online documentation for the SAP Knowledge Provider or the information available in the help portal under Basis -> Basis Services -> Business Workplace -> Administration of... -> Information on Documents... -> Configuring an HTTP Content Server for Documents.
    The relationship between the attachments and the business documents is provided via the Object Relationship Service.
    Defining attachments using the archive link
    If an optical archive was connected using the archive link and the corresponding settings for the document type were maintained for the object types of a business document, documents can be stored in the Content Repository, directly from the PC, via the 'Establish relationships for the stored document' or 'Store the business document' service.
    In addition, refer to the online documentation for more information on configuring the archive link.
    Best regards.

  • APEX 4 Images path

    Hi,
    i'm trying to use a progress indicator using javascript, which works fine. The problem is that the acutal progress image isnt' displayed.
    I have two static files that i have uploaded to workspace (#WORKSPACE_IMAGES#)
    progress.js
    progress.css
    the progress.js references the image
    progress.gif
    this i have tried to upload it to static files and images from Shared components -> files but with no effect
    The progress.js javascipt uses a prefix for the image /i/
    document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('fade').style.visibility = "visible";setTimeout('document.images["img_progress"].src = "/i/progress.gif"', 200);
    i tried replacing the /i/ with #WORKSPACE_IMAGES" but with no effect
    I also tried to find the image on my server. If this isn't installed in the db then i must be doing something wrong since i cannot find the file.
    Where are the files (path) supposed to be stored on the server?
    How can i change the source reference (/i/) to load the right file?
    Thank you.
    Teo

    Hi,
    Workspace images are not in HTTP server folder /i/.
    And you can not use substitution string #WORKSPACE_IMAGES# in statistic files.
    You need place your image to HTTP server /i/ folder and then use in js /i/progress.gif.
    Or write your js to e.g. page template header, then you can use substitution string #WORKSPACE_IMAGES#
    Regards,
    Jari

  • Carousel image path

    Hello all,
    I'm using JDev 11.1.1.3.
    I have a folder images inside public_html that contains sub-folders with images. I have a page with a selectOneChoice that is populated by a list from database, and each selection on that list fits a sub-folder inside images folder, and every sub-folder contains list of images to be displayed in carousel.
    So far I have worked on two different approaches but none of them worked. First of all, I don't know how to enter public_html/images from backingBean in order to list files under sub-folder. I tried to find a physical path on server with getPath() or getContextPath() and that works on my local machine. But as soon as I deploy this to standalone server, getPath() says null and I cannot access anywhere.
    Then I tried to place a folder with images somewhere outside project, for example c:\myproject\images on server machine. But while this works with IE, it does not with Firefox or Chrome because they don't like absolute paths for images.
    Does anyone have any idea how to solve this?
    Thanks in advance!

    Sorry for my late response, I tried every logical path for images, including the one you suggested, but none of them worked.
    The problem is with backingBean, if I put images inside public_html, once app is deployed on server backingBean does not know what is public_html or where it is, because the whole app is packed in an ear file.
    Few days ago I found the thing I was looking for. I solved this using virtual directory mapping.
    So if I put something like this in weblogic.xml:
    <virtual-directory-mapping>
        <local-path>C:\myapp\images</local-path>
        <url-pattern>*.png</url-pattern>
    </virtual-directory-mapping>my backingBean can list directory that is located on filesystem (C:\myapp\images), and images inside carousel are finally displayed correctly in every browser.
    This works for all images, not only the ones inside carousel.

  • How to Upload Web App images to different server?

    Hello,
    is it possible to configure web app item submission so images are uploaded to a different server (not BC)?
    Customers are uploading lots of images with their web app items and I'm really getting short on server storage. Buying extra space in BC servers is a bit expensive, especially when I need loads of it. Smart thing would be to AUTO resize images to take much less space in the server but this is not possible with BC as no back end is allowed (maybe this could good improvement in next releases? "Auto resizing images to the value indicated"). Some customers are uploading images of up to 9 MB size X 20. I could limit upload size (i guess), but thats a big hit to UX, they should then bother resizing their images on some software before uploading.
    So far my solution is to simply download images from the server, resize them manually with PS and then upload them back again. Maybe someone knows better solution than photoshop to automate the resizing process? I actually can automate the process with PS but image names changes and this is another problem. So a program to auto resize loads of images and keep their original names?
    Another solution could be manually storing images to another server and retyping the links in web app items, but its a bit too crazy
    Thanks

    Hi Ray,
    Indeed, this is not possible as an 'out of the box' feature and looks like a long-shot if attempting to use a separate server for storage.

Maybe you are looking for

  • Variable sharing from one class to another??

    Hi!! Suppose two classes, one class extend from JFrame and another from JDialog.I want to share the variable of Second one(extending JDialog) into firstone.How can I get this? please help me.

  • A simple question about Drag and Relate navigation

    Dear experts I have found SAP help or related manuals only good at talking difficult things such as how to customise the drag and relate targets, etc.  However, after I followed exactly and then how to test. Then I just see pieces of information, ver

  • Going back to a completed question

    Hi, I have a Captivate 8 project where there are several sections with review questions at the end of each section. I am using the table of contents to allow users to move around the whole project, and have enabled the move backwards option on the qu

  • Use more than one song on slideshow?

    When it comes to both Final Cut Pro HD vs. Final Cut Express HD... With either one can you use more than one iTune song when making a picture slideshow? I currently just use iMovie to do this but with iMovie I can only use one song. Considering upgra

  • Can I call applet in other applet???

    1.Just like a call a frame in new window.....can i call a frame in the same window. 2.Can i call an another applet in the same window from a running applet.if yes how can i send any variables to it??