diff --git a/src/GeoOverlay.php b/src/GeoOverlay.php index 24afe2a..af46a09 100644 --- a/src/GeoOverlay.php +++ b/src/GeoOverlay.php @@ -103,7 +103,7 @@ public function volume() */ public function getPathAttribute() { - return "{$this->id}/{$this->id}_original"; + return "{$this->id}/{$this->id}_original.tif"; } /** @@ -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"); } } diff --git a/tests/GeoOverlayTest.php b/tests/GeoOverlayTest.php index 7f7f95e..d44d058 100644 --- a/tests/GeoOverlayTest.php +++ b/tests/GeoOverlayTest.php @@ -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()); } } \ No newline at end of file