Comments (6)
Going to work on this.
Because the current code is based on try...rescue
, I think we can get away with pattern matching to provide more meaningful feedback to the person using the API, specifically stating where the error occurred (whether it was creating CID
, extension, etc...).
Implementing should be easy, testing might be slightly harder and probably will have to use mock
to get it cover all possible scenarios.
from imgup.
I now realise that it was a mistake for me to apply a priority-1
label to this issue. 😞
There were several issues contained within this "Edge Cases" issue
and they should have have been split out into multiple issues.
The reason It's taken me so long to review the PR is that it covers many things.
We should have addressed each one individually.
If the CID
fails because the file is not readable, that's one thing.
If the file cannot be read that's another
If we cannot upload to S3
that's a whole other error.
We definitely don't want to Mock
anything unless we absolutely have no other choice.
I've now spent more time on this issue and PR than I have on my own work for the last 2 weeks.
That has completely sucked my energy and I'm not happy about it.
I've learned my lesson. Don't work on anything that wasn't requested by a person
using the product.
from imgup.
Good call. If you have time, please PR the update. 🙏
We are currently busy trying to debug #71 🙃
from imgup.
All in favour of fixing edge cases. 👍
Please write the test first. 🧑💻
Or at least drop a comment in this thread sharing what you're thinking. 💭
Note: Mocking is fine in a library e.g:
elixir-auth-google
but should be avoided in an App such as this one.
from imgup.
Getting the following error when attempting to upload on: https://imgup.fly.dev/liveview
Couldn't upload files to S3. Open an issue on Github and contact the repo owner.
![image](https://private-user-images.githubusercontent.com/194400/250960470-5a3d22e1-b5bd-421b-8255-423027aafdf7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODc1MjAsIm5iZiI6MTcxOTk4NzIyMCwicGF0aCI6Ii8xOTQ0MDAvMjUwOTYwNDcwLTVhM2QyMmUxLWI1YmQtNDIxYi04MjU1LTQyMzAyN2FhZmRmNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzAzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwM1QwNjEzNDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MTI3NWRlMmVlYWJmYzkxODQyMWRmMjNlNTM5OWEzNWJiN2UzZjMwZjQ3MjI3YmQ0ZDY2MzRjMzk2MzRkODYxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.AIsWHfvVrXXJ9wndTKK6miPSbRtyYEDhpDMjGRXRfWQ)
New issue: #88
from imgup.
Really not a fan of having mocks for edge cases that we haven't seen in the real world.
Would much rather have deliberately crafted files that simulate the edge cases
such as empty or corrupted files.
Mocking is a false positive.
Unless we have actual tests this is always going to be incomplete.
from imgup.
Related Issues (20)
- chore: CORS issue when calling the API from `Flutter` web devices
- Discuss: Dedicated Domain for Image Uploading + Hosting? HOT 1
- chore: Build is failing HOT 4
- Chore: Re-do Landing Page - Remove All Non-essential HOT 1
- Feat: Add Button + `JS` To Copy Image URL HOT 2
- add passing an URL and query string params to resize an image? HOT 3
- Ex_AWS update 2.5.0. No more xml parsing needed HOT 1
- Testing Image-To-Text HOT 84
- First tests - Upload to R2 HOT 6
- First tests - upload to B2 from the server seems ok with ExAws.S3
- Chore: @dependabot Builds Fail 😢 HOT 5
- Chore: Remove Image Expiry (Don't delete images from S3) HOT 4
- `imgup` Fly.io App deployment overwriting AWS env vars leading to failure HOT 4
- chore: Have bucket names imported env variables
- BUG: Couldn't upload files to S3. Open an issue on Github and contact the repo owner. HOT 2
- Feat: Logging + Metrics
- `Who` can/should use our image uploading + resizing service?
- EPIC: Clarifying Goals/Roadmap for Image Uploads Project HOT 3
- Chore: Replace `AWS S3` with `Backblaze B2`
- Feat: Dynamic Image Resizing HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgup.