Skip to content
This repository has been archived by the owner on Aug 20, 2023. It is now read-only.

Commit

Permalink
Fix missing caption feature
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Feb 27, 2022
1 parent 07f05d6 commit d005838
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions app/Support/MediaLibrary/UrlGenerator/DefaultUrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function getBaseMediaDirectoryUrl(): string

public function getPath(): string
{
return $this->getRootOfDisk().$this->getPathRelativeToRoot();
return $this->getRootOfDisk() . $this->getPathRelativeToRoot();
}

public function getResponsiveImagesDirectoryUrl(): string
Expand All @@ -50,11 +50,11 @@ public function getResponsiveImagesDirectoryUrl(): string

$path = $this->pathGenerator->getPathForResponsiveImages($this->media);

return Str::finish(url($base.$path), '/');
return Str::finish(url($base . $path), '/');
}

protected function getRootOfDisk(): string
{
return config("filesystems.disks.{$this->getDiskName()}.root").'/';
return config("filesystems.disks.{$this->getDiskName()}.root") . '/';
}
}
8 changes: 4 additions & 4 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
Route::middleware('auth:sanctum')->get('/', ['uses' => 'IndexController', 'as' => 'index']);
Route::middleware('auth:sanctum')->get('/{video}', ['uses' => 'ShowController', 'as' => 'show']);
Route::middleware('auth:sanctum')->delete('/{video}', ['uses' => 'DestroyController', 'as' => 'destroy']);
Route::middleware('auth:sanctum')->patch('/{video}', ['uses' => 'UpdateController', 'as' => 'update']);
Route::middleware('auth:sanctum')->post('/{video}', ['uses' => 'UpdateController', 'as' => 'update']);

// DASH
Route::middleware('auth:sanctum', 'cache.headers:public;max_age=86400;etag')->get('/manifest/{video}', ['uses' => 'ManifestController', 'as' => 'manifest']);
Route::middleware('signed', 'cache.headers:public;max_age=86400;etag')->get('/sprite/{video}', ['uses' => 'SpriteController', 'as' => 'sprite']);

// Miscellaneous
Route::middleware('auth:sanctum')->patch('/favorite/{video}', ['uses' => 'FavoriteController', 'as' => 'favorite']);
Route::middleware('auth:sanctum')->patch('/follow/{video}', ['uses' => 'FollowController', 'as' => 'follow']);
Route::middleware('auth:sanctum')->post('/favorite/{video}', ['uses' => 'FavoriteController', 'as' => 'favorite']);
Route::middleware('auth:sanctum')->post('/follow/{video}', ['uses' => 'FollowController', 'as' => 'follow']);
Route::middleware('auth:sanctum')->get('/similar/{video}', ['uses' => 'SimilarController', 'as' => 'similar']);
Route::middleware('auth:sanctum')->get('/roulette/random', ['uses' => 'RandomController', 'as' => 'random']);
});
Expand All @@ -54,7 +54,7 @@
// Media
Route::name('media.')->prefix('media')->namespace('Media')->group(function () {
// Resources
Route::middleware('auth:sanctum')->patch('/{media}', ['uses' => 'UpdateController', 'as' => 'update']);
Route::middleware('auth:sanctum')->post('/{media}', ['uses' => 'UpdateController', 'as' => 'update']);

// Miscellaneous
Route::middleware('signed', 'cache.headers:public;max_age=86400;etag')->get('/asset/{media}', ['uses' => 'ResponseController', 'as' => 'response']);
Expand Down
2 changes: 0 additions & 2 deletions storage/app/media/.gitignore

This file was deleted.

0 comments on commit d005838

Please sign in to comment.