That feels strange to me as we're using property accessor.

Couldn't we use `$propertyAccessor->setValue($product, '<attribute_code>.media.file', $file)` ?