aboutsummaryrefslogtreecommitdiff
path: root/weed/server
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2020-07-09 19:42:50 -0700
committerGitHub <noreply@github.com>2020-07-09 19:42:50 -0700
commitcf43edc67705d8b330b895b81b77bdda3ed4e17b (patch)
treeafa366c6b8a235bc7561116397cb54cae784646b /weed/server
parent1b680c06c1de27e6a3899c089ec354a9eb08ea44 (diff)
parent8c318470dd95b3fc24d39dc3cf253cc17b03ab39 (diff)
downloadseaweedfs-cf43edc67705d8b330b895b81b77bdda3ed4e17b.tar.xz
seaweedfs-cf43edc67705d8b330b895b81b77bdda3ed4e17b.zip
Merge pull request #1385 from yourchanges/master
Revert "remove fixJpgOrientation"
Diffstat (limited to 'weed/server')
-rw-r--r--weed/server/volume_server.go3
-rw-r--r--weed/server/volume_server_handlers_write.go2
2 files changed, 4 insertions, 1 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index b7ed81be0..3af37b491 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -25,6 +25,7 @@ type VolumeServer struct {
grpcDialOption grpc.DialOption
needleMapKind storage.NeedleMapType
+ FixJpgOrientation bool
ReadRedirect bool
compactionBytePerSecond int64
MetricsAddress string
@@ -39,6 +40,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
masterNodes []string, pulseSeconds int,
dataCenter string, rack string,
whiteList []string,
+ fixJpgOrientation bool,
readRedirect bool,
compactionMBPerSecond int,
fileSizeLimitMB int,
@@ -59,6 +61,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
dataCenter: dataCenter,
rack: rack,
needleMapKind: needleMapKind,
+ FixJpgOrientation: fixJpgOrientation,
ReadRedirect: readRedirect,
grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.volume"),
compactionBytePerSecond: int64(compactionMBPerSecond) * 1024 * 1024,
diff --git a/weed/server/volume_server_handlers_write.go b/weed/server/volume_server_handlers_write.go
index 5ece46ed0..74dad28de 100644
--- a/weed/server/volume_server_handlers_write.go
+++ b/weed/server/volume_server_handlers_write.go
@@ -42,7 +42,7 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
return
}
- reqNeedle, originalSize, ne := needle.CreateNeedleFromRequest(r, vs.fileSizeLimitBytes)
+ reqNeedle, originalSize, ne := needle.CreateNeedleFromRequest(r, vs.FixJpgOrientation, vs.fileSizeLimitBytes)
if ne != nil {
writeJsonError(w, r, http.StatusBadRequest, ne)
return