* Make thumbnails on the "My Uploads" page show an icon with an image count when an upload contains multiple files. * Make the "My Uploads" page show each upload, not each individual file. If an upload contains multiple files, they're shown grouped together under a single upload. This does mean that failed or duplicate uploads will show up on this page now. This is because this page shows each upload attempt, not each uniquely uploaded file.
18 lines
503 B
Ruby
18 lines
503 B
Ruby
# frozen_string_literal: true
|
|
|
|
class MediaAssetsController < ApplicationController
|
|
respond_to :html, :json, :xml
|
|
|
|
def index
|
|
@media_assets = authorize MediaAsset.visible(CurrentUser.user).paginated_search(params, count_pages: false)
|
|
@media_assets = @media_assets.includes(:media_metadata, :post)
|
|
respond_with(@media_assets)
|
|
end
|
|
|
|
def show
|
|
@media_asset = authorize MediaAsset.find(params[:id])
|
|
@post = Post.find_by_md5(@media_asset.md5)
|
|
respond_with(@media_asset)
|
|
end
|
|
end
|