Skip to content

Keep original file on disk #175

@daniel-de-wit

Description

@daniel-de-wit

I'm working on a Laravel 5.3 project where the laravel stapler package has been integrated with my model. For testing purposes i've made some database seeds that create some dummy records.

While attaching files to these records, Stapler deletes the original file on disk?
For example:

$filePath = 'some_dir/myfile.png';

$record = MyModel::create([
    'image' => $filePath,
]);

After running, the file located at $filePath is deleted from disk. This is not what I expected, how should I stop Stapler from deleting my files?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions