class Avo::Fields::Common::SingleFileViewerComponent

def record_persisted?

If model is not persistent blob is automatically destroyed otherwise it can be "lost" on storage
def record_persisted?
  return true if @resource.model.persisted?
  ActiveStorage::Blob.destroy(file.blob_id) if file.blob_id.present?
  false
end