Git Product home page Git Product logo

Comments (6)

LuchoTurtle avatar LuchoTurtle commented on July 3, 2024 1

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.

nelsonic avatar nelsonic commented on July 3, 2024 1

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.

nelsonic avatar nelsonic commented on July 3, 2024

Good call. If you have time, please PR the update. 🙏
We are currently busy trying to debug #71 🙃

from imgup.

nelsonic avatar nelsonic commented on July 3, 2024

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.

nelsonic avatar nelsonic commented on July 3, 2024

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

New issue: #88

from imgup.

nelsonic avatar nelsonic commented on July 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.