In Rails 3.0.X, I would store my flash files in public/flash. Flash files such as: jwplayer, uploadify, etc.
With the introduction of the new directory structure in 3.1 (i.e. app/assets/), should flash files still be stored in public/flash or should I create a new directory called 'flash' in app/assets/ ?
USB 3.1 is backwards compatible with USB 3.0 and USB 2.0, except in the following scenarios: USB-B 3.1 cables are not compatible with USB-B 2.0 ports. Unless you use an adapter, USB-C ports or cables will not work with USB-A or USB-B ports or cables.
A USB drive, also referred to as a flash drive or memory stick, is a small, portable device that plugs into the USB port on your computer.
One of the most user-friendly aspects of USB is that its primary shape—the classic rectangle (Type-A) —is physically compatible with all earlier versions. This means USB Type-A plugs in versions 3.0, 3.1 or 3.2 will fit into old USB 2.0 ports and vice versa.
Here's the short answer… USB 3.0 is 5Gb/s, USB 3.1 is 10Gb/s, and USB 3.2 is the fastest at 20Gb/s. You may have seen them branded as SuperSpeed USB 5Gbps/10Gbps/20Gbps. The only thing you need to pay attention to is the transfer speeds.
You can use the Sprockets provide
directive.
For example, this is how I am using Plupload:
# app/assets/javascripts/plupload.js
//= require plupload/plupload
//= require plupload/plupload.flash
//= require plupload/plupload.silverlight
//= provide plupload/dependencies
The corresponding vendor directory is organised like this:
vendor
├── assets
│ ├── javascripts
│ │ └── plupload
│ │ ├── dependencies
│ │ │ ├── plupload.flash.swf
│ │ │ └── plupload.silverlight.xap
│ │ ├── plupload.flash.js
│ │ ├── plupload.js
│ │ └── plupload.silverlight.js
│ └── stylesheets
└── plugins
I then use <%= javascript_include_tag 'plupload' %>
when I want to use Plupload, and use the asset_path
helper to populate the Plupload configuration:
<%= javascript_include_tag 'plupload' %>
<script type="text/javascript">
$(function() {
var uploader = new plupload.Uploader({
runtimes : 'flash,silverlight',
multipart : true,
multipart_params : {
'authenticity_token' : '<%= form_authenticity_token %>'
},
flash_swf_url :
'<%= asset_path "plupload/dependencies/plupload.flash.swf" %>',
silverlight_xap_url :
'<%= asset_path "plupload/dependencies/plupload.silverlight.xap" %>',
url : '<%= url_for [@item, :photos] %>',
// ...
});
Hope that helps.
if these are .swf
files, I don't think they belong in app/assets
. The asset folder allows for pre-"compiled" app asset files for CoffeeScript and SCSS (or similar js and css "compilers"). If you are compiling .as
files into .swf
files as part of your deploy or startup process, I could see it making sense to put them in the asset folder. However, this seems like a horrible idea.
=================UPDATE=====================
I was wrong. The asset folder is for serving Sprockets assets. As long as you can handle digested asset paths you should use Sprockets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With