[eluser]qwertyqwerty[/eluser]
@jmadsen You need to make a reference to the Code Igniter environment as $this in the context of a model does not refer to the Code Igniter environment, but rather to the current Model instance.
@luffy I'd actually try to avoid having your models call each other and instead, move this functionality to your controller.
E.g. Your controller action would create the file, get returned an ID of the record created. Then use that ID and create a corresponding setting record.
Make sense?