This is true, but the materials on Fold3.com are not complete for the compiled military service records for the Civil War. Many states, as of this writing, only have the index cards available. This is true for several states, including Illinois from which Riley served.
Readers with a Fold3.com membership can view the images on the site. Just remember that what Fold3.com has is not complete.
Like most fee-based sites, they don't remind you that there are other materials out there that they don't have. Readers can always get copies from the National Archives.
You can browse Fold3.com's Civil War Collection