We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 244-247 (lines=4) @@ | ||
| 241 | ||
| 242 | // if a new file is uploaded, delete the file from the disk |
|
| 243 | if (($request->hasFile($attribute_name) || starts_with($value, 'data:image')) && $this->{$attribute_name}) { |
|
| 244 | foreach ($variations as $variant => $dimensions) { |
|
| 245 | $variant_name = str_replace('-original', '-'.$variant, $this->{$attribute_name}); |
|
| 246 | \Storage::disk($disk)->delete($variant_name); |
|
| 247 | } |
|
| 248 | $this->attributes[$attribute_name] = null; |
|
| 249 | } |
|
| 250 | ||
| @@ 253-256 (lines=4) @@ | ||
| 250 | ||
| 251 | // if the file input is empty, delete the file from the disk |
|
| 252 | if (empty($value)) { |
|
| 253 | foreach ($variations as $variant => $dimensions) { |
|
| 254 | $variant_name = str_replace('-original', '-'.$variant, $this->{$attribute_name}); |
|
| 255 | \Storage::disk($disk)->delete($variant_name); |
|
| 256 | } |
|
| 257 | ||
| 258 | return $this->attributes[$attribute_name] = null; |
|
| 259 | } |
|