awslabs / aws-js-s3-explorer

AWS JavaScript S3 Explorer is a JavaScript application that uses AWS's JavaScript SDK and S3 APIs to make the contents of an S3 bucket easy to browse via a web browser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Downloading files from S3 bucket results in modified filenames

simonrp84 opened this issue · comments

Hello,
I am browsing the NOAA GOES-16 data archive on AWS: https://noaa-goes16.s3.amazonaws.com/index.html
And have noticed that if I click a file to download it then the filename of the downloaded file doesn't match the filename in the S3 bucket.

For example, if I load the above webpage and then click '2019' followed by '001', then '00' I will get a list of files. If I then click the topmost file it will begin downloading, and will be saved with this filename:
ABI-L1b-RadF_2019_001_00_OR_ABI-L1b-RadF-M3C01_G16_s20190010000364_e20190010011131_c20190010011177.nc
But that filename doesn't follow the correct convention for GOES files, it should have this name:
OR_ABI-L1b-RadF-M3C01_G16_s20190010000364_e20190010011131_c20190010011177.nc
i.e: The ABI-L1b-RadF_2019_001_00_ at the front of the filename should not be there. This only happens when downloading files via a web browser. Downloading via the AWS CLI, python or any other tool works ok. I mentioned this to @zflamig via email and he says that the code behind the S3 explorer is prepending the directory structure to the filename.

Would it be possible to add a workaround for this? It's causing some issues for GOES data users as the filenames aren't matching what the various processing / image display packages expect.

Thanks!
Simon

This has also been a problem for me when pointing users to the data and telling them how to use the files. Some jupyter notebooks and other examples that I use to teach people how to use my software include finding files with glob patterns or listing a directory. It is very confusing to new users and students when the example filenames in the instructions don't match what they have.

commented

I can reproduce this and will investigate. Apologies that it is causing a problem for you.

commented

Potentially caused by #18, fixed by #25. Verifying with open data team at AWS.

Hi @simonrp84 @djhoese the noaa-goes16 bucket should be updated to the new version as recommended by @john-aws now. Can you check that it is working as expected for you? You may need to hard refresh to load the new index.html

It required clearing my browser's cache, but it looks like it is working. Thanks!

Thanks @zflamig and @john-aws, I can confirm it's working as expected - the files have correct names when they're downloaded now. As a positive side-effect, I can also now link directly to an S3 'subdirectory' - which is great!

I'll close the issue now, really appreciate the quick response on this.