Skip to content

Commit 4aec85e

Browse files
author
Jeremy Clemans
committed
Adds more detailed instructions on how to get file meta data
1 parent c50d782 commit 4aec85e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ This will produce:
4343
1. A transcoded `:medium` FLV file with the requested dimensions if they will match the aspect ratio of the original file, otherwise, width will be maintained and height will be recalculated to keep the original aspect ration.
4444
2. A screenshot `:thumb` with the requested dimensions regardless of the aspect ratio.
4545

46-
You may optionally add `<attachment>_meta` to your model and it will get populated with information about the processed video.
46+
### Meta Data
47+
48+
Then paperclip-av-transcoder can optionally add uploaded file meta data to a database column for `<your_attachment>_meta`.
49+
50+
Example: Given a model called `User` with an attachment field named `:avatar`, create a new migration to add an `avatar_meta` column to the `users` table.
51+
```
52+
def change
53+
add_column :users, :avatar_meta, :data_type
54+
end
55+
```
56+
You can use a data type of `:json`, `:jsonb`, `:hstore` or even just `:string`. Check what data types your database supports.
4757

4858
### `geometry`
4959

0 commit comments

Comments
 (0)