• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] Image Path

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED] Image Path

    Hey guys. I have some photos that the people in Marketing have the I need for my app. When the user clicks on an item a window with a picture of that item should appear. I tested showing a pic that I put in the /vvresources/images/ directory and it the pic will appear but if I put pics in a new folder I created in the IFS ROOT directory called /Marketing-Images/ the pic wont appear.

    The error that appears in the console is the following

    GET http://hficorp2:6005/Marketing-Images/1.jpg 403 (Forbidden) ext-all.js:7

    Does the system only accept certain directories for pics and if so how can I add my new folder to the mix? Keep in mind I am still using Valence 2.2.

    Thanks

    Brian

  • #2
    Your Apache configuration would dictate which files/directories are publicly available, so you would need to add directives to allow access to other directories.

    The Valence manual should have information on how this would be configured and you can copy one of the existing blocks to a new one and rename it "Marketing-Images". Something like this:

    # Marketing Image directory - public
    Alias /Marketing-Images /Marketing-Images
    <Directory /Marketing-Images>
    Order Allow,Deny
    allow from all
    </Directory>

    Comment


    • #3
      Originally posted by BRandle View Post
      Your Apache configuration would dictate which files/directories are publicly available, so you would need to add directives to allow access to other directories.

      The Valence manual should have information on how this would be configured and you can copy one of the existing blocks to a new one and rename it "Marketing-Images". Something like this:

      # Marketing Image directory - public
      Alias /Marketing-Images /Marketing-Images
      <Directory /Marketing-Images>
      Order Allow,Deny
      allow from all
      </Directory>
      Is this something I can do through the Valence system of outside of it? I dont know if I am allowed do what your asking but I can try if its through the Valence Portal. if not that I dont think I can do that.

      Comment


      • #4
        Yes, the Apache server is not part of the Valence Portal. A system administrator would need to change the Apache settings to allow access to the IFS directory.

        Comment


        • #5
          Originally posted by BRandle View Post
          Yes, the Apache server is not part of the Valence Portal. A system administrator would need to change the Apache settings to allow access to the IFS directory.
          I was able to change the config file with the folder that will eventually contain the images so thats all good. I do however have a queston regarding the image names. Most of the image names have blanks as part of the name. For example:

          1.5 oz Sea Salt Popped Chips - 9662.jpg

          So the name of the image path in this case would be.

          <img src="/Marketing-Images/1.5 oz Sea Salt Popped Chips - 9662.jpg " width="100" height="100">

          Will that work or will I have to change the name of the path to something more simple like this which I know works

          <img src="/Marketing-Images/1.jpg" width="100" height="100">

          Comment


          • #6
            Spaces should not be a problem within the quotes, but I would advise against them.

            Also, that space at the very end, (.jpg ") is going to cause problems because that isn't in your file name.

            Did you try this yet?

            Comment


            • #7
              Originally posted by eweiler View Post
              Spaces should not be a problem within the quotes, but I would advise against them.

              Also, that space at the very end, (.jpg ") is going to cause problems because that isn't in your file name.

              Did you try this yet?
              Sorry about the extra space at the end. My fault. Thats not how the path looks in the field currently in the field. This is how it looks in my field called IT_PATH. I did put the IMG SRC code in as well to get it to work as well as the width and height sizes. That is not in error.

              <img src="/Marketing-Images/1.jpg" width="100" height="100">

              Keep in mind this is a field that is showing on the grid. I had to call the pic 1.Jpg to get it to show.

              Also, I dont want to put the width and heighth in the path name to get the pic to be sized as a thumbnail. The pics were made very big. is there a CSS or HTML code that I can do on that field in the grid so I dont have to put the W and H it in the name of the path?

              I also am showing the pic in a window when the user right clicks on that row on the grid. I cant use the path name the way I do in the field with the IMG SRC in the code.

              Comment


              • #8
                This issue is ok now. I did some front end stuff to take care of it and some on the back end as well. Thanks for the help.

                Comment

                Working...
                X