Merge pull request #9825 from PetriAsi/feature/api-image-uploads

Fixed #9767 : Feature/api image uploads legacy image_source property  support
This commit is contained in:
snipe 2021-07-14 10:24:40 -07:00 committed by GitHub
commit 5e76d50f2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -459,6 +459,14 @@ class AssetsController extends Controller
$asset->rtd_location_id = $request->get('rtd_location_id', null);
$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 in the database.