Skip to content

Commit

Permalink
Make thumbnail clear available for images/videos/pdfs
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Jan 16, 2025
1 parent 66f1521 commit 204e0e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/

namespace Pimcore\Bundle\StudioBackendBundle\Asset\Controller\Image;
namespace Pimcore\Bundle\StudioBackendBundle\Asset\Controller;

use OpenApi\Attributes\Delete;
use Pimcore\Bundle\StudioBackendBundle\Asset\Service\AssetServiceInterface;
Expand All @@ -36,7 +36,7 @@
/**
* @internal
*/
final class ThumbnailImageClearController extends AbstractApiController
final class ThumbnailClearController extends AbstractApiController
{
use PaginatedResponseTrait;

Expand All @@ -51,16 +51,16 @@ public function __construct(
* @throws UserNotFoundException
*/
#[Route(
path: '/assets/{id}/image/thumbnail/clear',
name: 'pimcore_studio_api_clear_image_thumbnail',
path: '/assets/{id}/thumbnail/clear',
name: 'pimcore_studio_api_clear_thumbnail',
methods: ['DELETE']
)]
#[IsGranted(UserPermissions::ASSETS->value)]
#[Delete(
path: self::PREFIX . '/assets/{id}/image/thumbnail/clear',
operationId: 'asset_image_clear_thumbnail',
description: 'asset_image_clear_thumbnail_description',
summary: 'asset_image_clear_thumbnail_summary',
path: self::PREFIX . '/assets/{id}/thumbnail/clear',
operationId: 'asset_clear_thumbnail',
description: 'asset_clear_thumbnail_description',
summary: 'asset_clear_thumbnail_summary',
tags: [Tags::Assets->value]
)]
#[IdParameter(type: ElementTypes::TYPE_ASSET)]
Expand All @@ -70,7 +70,7 @@ public function __construct(
HttpResponseCodes::NOT_FOUND,
HttpResponseCodes::INTERNAL_SERVER_ERROR,
])]
public function clearImageThumbnails(int $id): Response
public function clearThumbnails(int $id): Response
{
$this->assetService->clearThumbnails($id);

Expand Down
4 changes: 2 additions & 2 deletions translations/studio_api_docs.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ asset_get_tree_summary: Get all asset data for the tree
asset_image_create_thumbnail_description: |
Create a new image thumbnail based on the provided <strong>{id}</strong> and configuration parameters. <br>
The <strong>{id}</strong> must be an ID of existing asset image
asset_image_clear_thumbnail_summary: Clear image thumbnail by ID
asset_image_clear_thumbnail_description: |
asset_clear_thumbnail_summary: Clear image thumbnail by ID
asset_clear_thumbnail_description: |
Clear the image thumbnail based on the provided <strong>{id}</strong>. <br>
The <strong>{id}</strong> must be an ID of existing asset image
asset_image_download_by_format_success_response: Image asset binary file based on format
Expand Down

0 comments on commit 204e0e8

Please sign in to comment.