Comments (2)
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.
Closed via #74
from vip.
Related Issues (20)
- video with elastic transcode on media-proxy HOT 8
- Vip mangles transparency HOT 3
- Add environment variables to the README
- gif resizing
- Become sentient
- Support CMYK JPEG files HOT 4
- Try grabbing image size without decoding the whole image HOT 1
- can't seem to upload an image to vip... probably user error HOT 14
- [suggestion] smart crop HOT 2
- Uploading images via HTTPS should return a secure URL for getting the image
- `broken pipe` error instead of 413 when using RetroFit
- Clean up docs
- Update drone.yml to push build to vokal DockerHub on successful merge HOT 1
- How can we tag specific release versions on DockerHub?
- Remove HTTP/2 support until Go 1.6 HOT 2
- Non-integer input for size requests causes full image to be returned HOT 2
- Allow trailing slash on upload endpoint
- Incorrect Content-Type header prevents image resizing HOT 3
- Configurable logging port HOT 1
- Dead project? HOT 3
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 vip.