If source is an empty stream. write will never be invoked. so file wouldn't be created in database.