<commit_before># CarrierWave::DataUri

Carrierwave plugin that allows create image from data uri

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'carrierwave-data-uri'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install carrierwave-data-uri

## Usage

```ruby
class User < ActiveRecord::Base
  mount_uploader :avatar, AvatarUploader
end
```

Then we can create image from data

```
user = User.find 123
user.image_data_uri = 'data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP////8AAP///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=='
user.save
```
## Contributing

1. Fork it ( https://github.com/[my-github-username]/carrierwave-data-uri/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request<commit_msg>add credits<commit_after># CarrierWave::DataUri

Carrierwave plugin that allows create image from data uri

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'carrierwave-data-uri'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install carrierwave-data-uri

## Usage

```ruby
class User < ActiveRecord::Base
  mount_uploader :avatar, AvatarUploader
end
```

Then we can create image from data

```
user = User.find 123
user.image_data_uri = 'data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP////8AAP///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=='
user.save
```
## Contributing

1. Fork it ( https://github.com/[my-github-username]/carrierwave-data-uri/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Credits

* http://www.davehulihan.com/uploading-data-uris-in-carrierwave/
{'fraction_non_alphanumeric': 0.11987381703470032, 'fraction_numerical': 0.013669821240799159, 'mean_word_length': 4.40625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2904749', 'n_tokens_mistral': 700, 'n_tokens_neox': 634, 'n_words': 192}