Skip to content

Commit

Permalink
Added MIME-type to geotiff when original file is saved.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtiessen1175 committed Sep 23, 2024
1 parent 9d23357 commit 0f7d1bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GeoOverlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function volume()
*/
public function getPathAttribute()
{
return "{$this->id}/{$this->id}_original";
return "{$this->id}/{$this->id}_original.tif";
}

/**
Expand All @@ -114,6 +114,6 @@ public function getPathAttribute()
public function storeFile(UploadedFile $file)
{
Storage::disk(config('geo.tiles.overlay_storage_disk'))
->putFileAs($this->id, $file, "{$this->id}_original");
->putFileAs($this->id, $file, "{$this->id}_original.tif");
}
}
2 changes: 1 addition & 1 deletion tests/GeoOverlayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ public function testVolumeOnDeleteCascade()
public function testPathAttribute()
{
$model = self::createGeotiffOverlay();
$this->assertEquals("{$model->id}/{$model->id}_original", $model->getPathAttribute());
$this->assertEquals("{$model->id}/{$model->id}_original.tif", $model->getPathAttribute());
}
}

0 comments on commit 0f7d1bb

Please sign in to comment.