developmentseed / titiler

Build your own Raster dynamic map tile services
https://developmentseed.org/titiler/
MIT License
755 stars 156 forks source link

Can't load newly uploaded data from S3 if it previously failed #791

Closed christianaaronschroeder closed 5 months ago

christianaaronschroeder commented 5 months ago

Discussed in https://github.com/developmentseed/titiler/discussions/790

Originally posted by **christianaaronschroeder** March 8, 2024 I'm using titiler.application installed through pip and am trying to solve for a specific use case. That being when a user tries to load a COG from S3, finds out it isn't there, uploads the file, and then tries to access it again. Right now if I try to access a non-existent file with `http://0.0.0.0:8000/cog/info?url=s3://my-bucket/my_file.tif`, I get the expected response, ``` {"detail":"The specified key does not exist."} ``` So I go and upload the file to my S3 bucket and try `http://0.0.0.0:8000/cog/info?url=s3://my-bucket/my_file.tif` again. Now I would expect to get a proper response with the file's info, but instead I get this, ``` {"detail":"'/vsis3/my-bucket/my_file.tif' does not exist in the file system, and is not recognized as a supported dataset name."} ``` Does anyone know what is causing this and maybe a way around it?