# Solidus Product Attachments
This Solidus extension allows the administrator to upload files to a product or to a variant.
[![Build Status](https://semaphoreci.com/api/v1/projects/c5f055f7-da80-440c-9f7b-c9c6c4a87bfa/2535219/shields_badge.svg)](https://semaphoreci.com/renuo/solidus_product_attachments)
[![Gem Version](https://badge.fury.io/rb/solidus_product_attachments.svg)](https://badge.fury.io/rb/solidus_product_attachments)
## Installation
Add `solidus_product_attachments` to your `Gemfile`:
```ruby
gem 'solidus_product_attachments'
```
Bundle your dependencies and run the installation generator:
```shell
bundle
bundle exec rails g solidus_product_attachments:install
```
## Usage
### Backend
The usage of this extension is made very easy. All you have to do is to include it in your `Gemfile` and run the installer. After doing this, you can go to a product's page in the admin view and you'll notice a new `Documents` tab.
The functionality of the documents upload is very similar to the images upload. You can upload a document per drag and drop or you can choose a file manually.
### Frontend
This extension does not come with a frontend implementation of a download option for the users. It's completely up to you
to add it, but you can inspire yourself from the following example:
And the code (only for the product downloads, without css):
```erb
<% if @product.attachments.any? %>