-
Touch Premium Member
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?
-
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.
-
Touch Premium Member
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
-
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?
-
Touch Premium Member
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
-
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
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
-
Forum Rules