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

feat(storage): autodetect narrow down text/plain contentype #3022

Merged

Conversation

avallete
Copy link
Member

@avallete avallete commented Jan 8, 2025

Based on the filename extension on top of the content reading autodetect to have a behavior similar with what happen when uploading files via studio.

  • Add content type detection for JavaScript (text/javascript)
  • Add content type detection for CSS (text/css)
  • Add content type detection for SQL (application/x-sql)
  • Default to text/plain for unrecognized text files like .go

Add some unit testings for the ParseFileOptions function.

…extension

- Add content type detection for JavaScript (text/javascript)
- Add content type detection for CSS (text/css)
- Add content type detection for SQL (application/x-sql)
- Default to text/plain for unrecognized text files like .go
@avallete avallete requested a review from a team as a code owner January 8, 2025 04:46
@coveralls
Copy link

coveralls commented Jan 8, 2025

Pull Request Test Coverage Report for Build 12687632002

Details

  • 8 of 11 (72.73%) changed or added relevant lines in 3 files are covered.
  • 113 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.8%) to 58.828%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/storage/batch.go 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
pkg/storage/buckets.go 22 0.0%
pkg/storage/batch.go 39 0.0%
pkg/storage/objects.go 47 37.17%
Totals Coverage Status
Change from base Build 12683955565: -0.8%
Covered Lines: 7617
Relevant Lines: 12948

💛 - Coveralls

@sweatybridge sweatybridge force-pushed the feat/add-text-contentype-autodetect-narrow-down branch from 2e2c320 to f6a3cdb Compare January 9, 2025 09:47
@sweatybridge sweatybridge force-pushed the feat/add-text-contentype-autodetect-narrow-down branch from f6a3cdb to 6ab43fd Compare January 9, 2025 09:57
@sweatybridge sweatybridge enabled auto-merge (squash) January 9, 2025 10:01
@sweatybridge sweatybridge merged commit 3429667 into develop Jan 9, 2025
8 checks passed
@sweatybridge sweatybridge deleted the feat/add-text-contentype-autodetect-narrow-down branch January 9, 2025 10:04
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

Successfully merging this pull request may close these issues.

3 participants