Results 1 to 10 of 14

Thread: Where and how to store images?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Touch Premium Member
    Join Date
    Aug 2009
    Location
    San Diego, CA
    Posts
    31
    Vote Rating
    0
      0  

    Default Where and how to store images?

    Pardon if I'm missing the obvious but I'm trying to add a custom image label to my app. By default when I add the img control it is populated with Sencha logo and is referenced as "resources/images/sencha.png". There's no "resources" directory in the project source tree so I'm assuming that this file is loaded remotely. Does that mean that I have to have a running webserver and specify my image source using "http://foo.com/resources/images/foo.png"? Is there a way to add a static image files to the project ans have these published as part of the deploy?

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    You can create/add any additional files into the projects working directory that you would like.

    These will be included along with your deployment. You can reference these files relative to your urlPrefix/where you are developing/deploying.
    Aaron Conran
    @aconran

  3. #3
    Touch Premium Member
    Join Date
    Aug 2009
    Location
    San Diego, CA
    Posts
    31
    Vote Rating
    0
      0  

    Default

    Are you referring to the directory containing .metadata folder? If so - I manually created resources/images dir there and added foo.png. No image is shown in Designer which is not surprising to me since I think it is looking at some remote location. And when I do deploy the resource folder is not copied to my destination

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    Yes, your project directory.

    All additional files/folders here will copied to your deploy directory.

    Is your project directory in a webroot and does it match your urlPrefix in your settings?
    Aaron Conran
    @aconran

  5. #5
    Touch Premium Member
    Join Date
    Aug 2009
    Location
    San Diego, CA
    Posts
    31
    Vote Rating
    0
      0  

    Default

    OK - it does copy everything. Including .metadata and .svn folders (which I don't want is there any way to prevent this?). My project directory is not under my webserver. I'm using Tomcat so I deploy files under unwrapped WAR directory.
    I get it to the point where after deploy I can see my image file on the webserver but that doesn't help me to build my UI in Designer since I can't get my image to display there

    So I have:
    Ext JS Path: http://extjs.cachefly.net/ext-4.0.2a/
    Sencha.io Library path: http://extjs.cachefly.net/designer/IO/
    URL Prefix: http://localhost:8080/foo/
    Deploy path: C:/dev/workspaces/td/ui/foo/src/main/webapp

  6. #6
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    The file will have to be servable by your urlPrefix and the relative path during design time if you wish to see it.

    We are working on some fixes regarding .metadata, .svn, etc
    Aaron Conran
    @aconran

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •