Skip to content

Commit

Permalink
hand legacy image_source field
Browse files Browse the repository at this point in the history
  • Loading branch information
PetriAsi committed Jul 15, 2021
1 parent 89cc84f commit 2fc3ff6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,14 @@ public function update(ImageUploadRequest $request, $id)
($request->filled('rtd_location_id')) ?
$asset->location_id = $request->get('rtd_location_id') : null;

/**
* this is here just legacy reasons. Api\AssetController
* used image_source once to allow encoded image uploads.
*/
if ($request->has('image_source')) {
$request->offsetSet('image', $request->offsetGet('image_source'));
}

$asset = $request->handleImages($asset);

// Update custom fields
Expand Down

0 comments on commit 2fc3ff6

Please sign in to comment.