Skip to content

Commit

Permalink
edit readme
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jul 29, 2015
1 parent c6d8175 commit 411f16a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ $mediaItems[0]->name = 'newName'
$mediaItems[0]->save(); // the new name gets saved. Activerecord ftw!
```

Using media-object the name of uploaded file can be changed.
```php
echo $mediaItems[0]->name // display the name
$mediaItems[0]->file_name = 'newFileName.jpg'
$mediaItems[0]->save(); // This will also rename the file on the filesystem.
```

You can also get the size of the file:
```php
$mediaItems[0]->size // returns the size in bytes
Expand Down

0 comments on commit 411f16a

Please sign in to comment.