1. Non-code files packed with an application (example, data or media files). 2. From a security point of view - any data or resource that should be (or can be) protected.
Questions tagged [assets]
3549 questions
35
votes
8 answers
Yii2 assets clear cache
Everytime I update my css or js files in infoweb\menu\module\assets, I have to empty the backend\web\assets folder
is there a way to automatically clear the assets cache?

Ruben
- 8,956
- 14
- 63
- 102
35
votes
4 answers
Laravel assets url
I have installed Laravel and began trying to write an app. I made some directories for my assets in the same directory as /app. But when I try to visit an image in my localhost for example: http://localhost/assets/images/image.png
I've also tried…

vikingcode
- 613
- 1
- 8
- 15
34
votes
18 answers
CSS is not loading in app
CSS won't load in my rails app. This is index.html.erb file located in view/products:
<% @products.each do |product| %>
Listing products
<%=…
![]()
Jamie
33
votes
1 answer
getAssets(); from another classI have a simple read a txt-file function.
AssetManager mngr = getAssets();
InputStream is = mngr.open("textdb.txt");
It works from my main activity. But if I use the same code in a separate class, getAssets() just return null / crash.
I am unable…
![]()
jonassvensson
32
votes
5 answers
Official way of adding custom fonts to Rails 4?I'm researching how to add custom fonts to my Rails app, e.g. by adding a fonts folder in the assets folder - and I cannot find an "official" Rails way on how to do this.
Yes, there are plenty of questions/answers here on SO about the matter, all…
![]()
Fellow Stranger
31
votes
1 answer
Get NGINX to serve .gz compressed asset filesRails 3.1 has a convenient system which can compress files into .gz files. However, instead what I've done is I've moved all the asset files that are created with assets:precompile to a static webserver. This all works, but how can I get nginx to…
![]()
matsko
30
votes
8 answers
cell imageView in UITableView doesn't appear until selected
Here is a video of the problem: http://youtu.be/Jid0PO2HgcU
I have a problem when trying to set the image for the [cell imageView] in a UITableView from the asset library.
The image is loaded but it doesn't appear in the cell until I touch…
![]()
Ali
30
votes
2 answers
How to avoid two files in project view when creating a custom importer in Unity3D?NOTE: I'm casting a wider net than Unity Answers, my original question can be found here.
I've created a ProTools CueSheet importer. It uses OnPostprocessAllAssets() to detect a files in the project that have a .cuesheet extension. It then runs…
![]()
Soviut
30
votes
4 answers
Load a simple text file in Android StudioGot a brand new project using Google's new Android Studio IDE.
I'm trying to load a simple text file using an InputStreamReader. I'm getting a file not found exception. Now there isn't any assets/ folder. I tried to create one and add my file at…
![]()
Yohann T.
30
votes
2 answers
How to pass a file path which is in assets folder to File(String path)?
Possible Duplicate:
Android - How to determine the Absolute path for specific file from Assets?
I am trying to pass a file to File(String path) class. Is there a way to find absolute path of the file in assets folder and pass it to File(). I…
![]()
akd
28
votes
4 answers
Android: Accessing images from assets/drawable foldersThe app I am currently working on has hundreds of images. At the moment I store them in the 'Drawable' folder. I was thinking about moving all of them to Assets folder.
My question is: Is there any difference in performance when using both…
![]()
Marqs
28
votes
3 answers
How to load videos from assets folder? (to play them with VideoView)I need to open a mp4 video from the assets folder and play it with VideoView.
I tryed with these two options, but none of them…
![]()
NullPointerException
28
votes
6 answers
How to open a pdf stored either in res/raw or assets folder?I'm going to show a pdf in my application, and the pdf has to be bundled with the application.
What is a good way to do this?
I have read that it might be possible to do this by adding the pdf file to a res/raw folder and read it from there, but i…
![]()
Ikky
28
votes
2 answers
Include assets from webpack bundled npm packageI've been banging my head over this for a while, and am wondering if it's even possible to begin with. Thanks for any help with this!
The npm package
I've got an npm package which is basically a library of React components. This library has embedded…
![]()
Johnny Copperstone
28
votes
4 answers
Android Assets with sub foldersInputStream myInput = myContext.getAssets().open("MyFolder/" + "MyFile.db3");
I have a file in the assets folder in a sub folder as above. It doesn't get the file though, is there a special way to specify a sub folder in the assets folder?
Ian
![]()
Ian Vink
|