I am storing some CSV files on S3 and I make them public to access it over browser but whenever I try to access S3 URL for the CSV it's getting downloaded. I already setup headers with Content-Type to text/csv.
Asked
Active
Viewed 1,747 times
0
-
Try changing the Content-Type to text/plain . It would be rare to want to view a CSV file in their browser? They're usually used to move data between systems. – Tim Jul 03 '19 at 18:59
-
Actually, I tried changing to text/plain still it's not working. – satya Jul 04 '19 at 06:10
-
Please edit your question to include a URL for us to try. – Tim Jul 04 '19 at 18:33
1 Answers
1
Well that would be my expected behavior. What do you want to be happening?
Shall the browser interpret the CSV somehow and display it? Maybe you have a link of an example where it behaves the way you want it to, so we get an idea...

pToker
- 51
- 4
-
currently, this is my CSV file link which is downloading https://ind-opinion-thumbnail.s3-ap-southeast-1.amazonaws.com/market_place/C2ImportFamRelSample.csv but my requirement is to open it on the browser. I tried with almost using all headers, is there any way to display a CSV file on browser from S3. – satya Jul 04 '19 at 06:25
-
I don't really know the possibilities of S3 but generally HTTP speaking, there is the possibility to set the header "Content-Disposition: inline". If you can do that in S3, maybe it helps. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition – pToker Jul 04 '19 at 09:03
-
I just found that the same link is opening in safari normally but in chrome, it's downloading. is anyone had any idea about it. – satya Jul 04 '19 at 10:14