Coder Social home page Coder Social logo

Comments (2)

jweber13 avatar jweber13 commented on September 16, 2024

So, for jpg's, the content length is taken directly from the image. See, req.ContentLength = fstat.Size()
in HandleUpload, that image is used to check the integrity of the file size, then passed into the processFile() method, which, in the case of a jpg, is manipulated since the image is rotated right off the bat.
Using print commands to follow the changes, the data.Length result from this action is always less than the ContentLength of the image itself before it's passed through.

If what we're looking to do is test that this change is consistent, I'll need to establish assert statements in test cases, two of which I've set up (for jpg's and png's, for added comparison of results)
Right now, those tests push through images of respective types. However, data.Length in HandleUpload doesn't seem to get passed back, I'll need to find a way to retrieve that.

from vip.

foresmac avatar foresmac commented on September 16, 2024

Closed via #74

from vip.

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.