Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure slashes work in pmtiles serve #59

Open
bdon opened this issue Jul 25, 2023 · 2 comments
Open

ensure slashes work in pmtiles serve #59

bdon opened this issue Jul 25, 2023 · 2 comments

Comments

@bdon
Copy link
Member

bdon commented Jul 25, 2023

No description provided.

@ebbishop
Copy link

ebbishop commented Nov 1, 2023

This may be relevant:
I have a directory tiles with a single archive, test.pmtiles. Running pmtiles serve . --cors=\* from within that directory does allow me to access tiles at localhost:8080/test/z/x/y.mvt. localhost:8080/test/metadata also gives the expected response.

However, running pmtiles serve /full/path/to/tiles --cors=\* results in the following error:

2023/11/01 09:41:14 server.go:124: failed to fetch test 0-0, blob (key "test.pmtiles") 
(code=NotFound): stat /full/path/to/tiles/full/path/to/tiles/test.pmtiles: no such file or directory

Note that the full path to the tiles directory is repeated.
localhost:8080/test/metadata returns the response Archive not found.

@bdon
Copy link
Member Author

bdon commented Nov 9, 2023

Here's a way to work around it for now:

go run main.go serve . --bucket=file:///full/path/to/folder

The "bucket" is a path like file:// or s3:// while the . is the prefix within that bucket. Right now the way the local file paths work is consistent with remote buckets. We could add some sugar to detect the local-paths case to make it more intuitive?

bdon added a commit that referenced this issue Nov 9, 2023
)

* Don't crash when the bucket is a non-existing file directory [#59]

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants