(image)
| 123 | } |
| 124 | |
| 125 | addImage(image) { |
| 126 | const id = this.media.length; |
| 127 | const medium = Object.assign({}, image, {type: 'image', name: `image${id}.${image.extension}`}); |
| 128 | this.media.push(medium); |
| 129 | return id; |
| 130 | } |
| 131 | |
| 132 | getImage(id) { |
| 133 | return this.media[id]; |