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

[PR] Addressing edge cases #86

Merged
merged 29 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3fa6ba3
fix: Pattern matching when file is read. #69
LuchoTurtle Jun 27, 2023
6dc3b4a
fix: Pattern matching to cover edge cases. #69
LuchoTurtle Jun 27, 2023
1490d08
feat: Adding tests to check for CID and extension pattern matching. #69
LuchoTurtle Jun 28, 2023
317f1be
fix: Finishing tests. #69
LuchoTurtle Jun 28, 2023
02933e6
feat: Adding section to README. #69
LuchoTurtle Jun 28, 2023
357c277
Chore: rename AWS_S3_BUCKET environment varialble names see: https://…
nelsonic Jul 5, 2023
cc0e976
add *real* test for uploading a JPEG image to S3 #91
nelsonic Jul 7, 2023
cb0a9a3
add fail.jpg (deliberately corrupted JPEG file) to test failure #69 /…
nelsonic Jul 11, 2023
beb03a1
chore: Refactoring CID and file extension upload part. #69
LuchoTurtle Jul 11, 2023
e307c4d
fix: Refactoring pattern matches on CID and extension.
LuchoTurtle Jul 11, 2023
18af780
chore: Refactoring upload file to separate function. #69
LuchoTurtle Jul 11, 2023
f48f346
fix: Adding `ex_aws` config in runtime so it works properly. #69
LuchoTurtle Jul 11, 2023
cf07017
Merge branch 'main' into edge-cases-#69
LuchoTurtle Jul 11, 2023
99dafd5
fix: Fixing mix.lock and getting tests to work with properly set newl…
LuchoTurtle Jul 11, 2023
6513f10
rename "fail.jpg" to "corrupted.jpg" for clarity #69
nelsonic Jul 12, 2023
c84c857
test for empty.jpg - empty file that has a .jpg extension. #69
nelsonic Jul 12, 2023
84e5593
add ginger.pdf (valid file) for API test #69
nelsonic Jul 12, 2023
4f97807
update codecov badge in README.md #69
nelsonic Jul 12, 2023
d43169a
fix: Removing mocks and adding rest of edge cases with empty files. #69
LuchoTurtle Jul 12, 2023
b4ffe49
fix: Updating README. #69
LuchoTurtle Jul 12, 2023
e75c283
fix merge conflicts in test/app_web/api_test.exs
nelsonic Jul 13, 2023
20b7205
fix failing test in test/app/upload_test.exs
nelsonic Jul 13, 2023
2e29f84
remove stray char from test/app/upload_test.exs (syntax error)
nelsonic Jul 13, 2023
831d2eb
log the error when upload_file_to_s3/3 fails #69
nelsonic Jul 15, 2023
ef113ec
comment out out Mock for S3 Upload (false positive) https://github.co…
nelsonic Jul 17, 2023
4c4a1a5
fix: Logging errors and returning relevant information to the person …
LuchoTurtle Jul 17, 2023
37d073c
Merge branch 'edge-cases-#69' of https://github.com/dwyl/imgup into e…
LuchoTurtle Jul 17, 2023
ab7fda5
chore: Updating API.md document with latest changes. #69
LuchoTurtle Jul 17, 2023
40e5455
feat: Add API return error when content type is invalid. #69
LuchoTurtle Jul 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-west-3
AWS_ORIGINAL_BUCKET: imgup-original
AWS_COMPRESSED_BUCKET: imgup-compressed
AWS_S3_BUCKET_ORIGINAL: imgup-original
AWS_S3_BUCKET_COMPRESSED: imgup-compressed

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ npm-debug.log

.env
.vscode/launch.json

# Mac Noise
.DS_Store
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# `image uploads`

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dwyl/imgup/ci.yml?label=build&style=flat-square&branch=main)
[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/imgup/main.svg?style=flat-square)](https://codecov.io/github/dwyl/imgup?branch=main)
[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/imgup/main.svg?style=flat-square)](http://codecov.io/github/dwyl/imgup?branch=main)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/imgup/issues)
[![HitCount](https://hits.dwyl.com/dwyl/imgup.svg?style=flat-square&show=unique)](https://hits.dwyl.com/dwyl/imgup)

Expand Down Expand Up @@ -149,6 +149,8 @@ and add your credentials to it:
export AWS_ACCESS_KEY_ID='YOUR_KEY'
export AWS_SECRET_ACCESS_KEY='YOUR_KEY'
export AWS_REGION='eu-west-3'
export AWS_S3_BUCKET_ORIGINAL=imgup-original
export AWS_S3_BUCKET_COMPRESSED=imgup-compressed
```

In your terminal, run `source .env` to export the keys.
Expand Down
Loading