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

Aws::S3 Incorrect Content-Type when compress=>:all_but_first #329

Open
AlShu opened this issue Jul 5, 2019 · 0 comments
Open

Aws::S3 Incorrect Content-Type when compress=>:all_but_first #329

AlShu opened this issue Jul 5, 2019 · 0 comments

Comments

@AlShu
Copy link

AlShu commented Jul 5, 2019

when compress=>:all_but_first
it choses always 'application/x-gzip'
for sitemap.xml

`

Call with a SitemapLocation and string data

def write(location, raw_data)
  SitemapGenerator::FileAdapter.new.write(location, raw_data)
  s3_object = s3_resource.bucket(@bucket).object(location.path_in_public)
  s3_object.upload_file(location.path,
    acl: 'public-read',
    cache_control: 'private, max-age=0, no-cache',
    content_type: location[:compress] ? 'application/x-gzip' : 'application/xml'
  )
end

`

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

1 participant