format changes

This commit is contained in:
chrislusf
2015-12-14 22:38:58 -08:00
parent df5e54e02a
commit e921cb1a9d
9 changed files with 30 additions and 34 deletions

View File

@@ -14,8 +14,8 @@ import (
"github.com/chrislusf/seaweedfs/go/glog"
"github.com/chrislusf/seaweedfs/go/images"
"github.com/chrislusf/seaweedfs/go/util"
"github.com/chrislusf/seaweedfs/go/operation"
"github.com/chrislusf/seaweedfs/go/util"
)
const (
@@ -53,7 +53,9 @@ func (n *Needle) String() (str string) {
return
}
func ParseUpload(r *http.Request) (fileName string, data []byte, mimeType string, isGzipped bool, modifiedTime uint64, ttl *TTL, isChunkedFile bool, e error) {
func ParseUpload(r *http.Request) (
fileName string, data []byte, mimeType string, isGzipped bool,
modifiedTime uint64, ttl *TTL, isChunkedFile bool, e error) {
form, fe := r.MultipartReader()
if fe != nil {
glog.V(0).Infoln("MultipartReader [ERROR]", fe)
@@ -163,7 +165,7 @@ func NewNeedle(r *http.Request, fixJpgOrientation bool) (n *Needle, e error) {
}
if isChunkedFile {
n.SetChunkManifest()
n.SetIsChunkManifest()
}
if fixJpgOrientation {

View File

@@ -16,7 +16,7 @@ const (
FlagHasMime = 0x04
FlagHasLastModifiedDate = 0x08
FlagHasTtl = 0x10
FlagChunkManifest = 0x80
FlagIsChunkManifest = 0x80
LastModifiedBytesLength = 5
TtlBytesLength = 2
)
@@ -283,9 +283,9 @@ func (n *Needle) SetHasTtl() {
}
func (n *Needle) IsChunkedManifest() bool {
return n.Flags&FlagChunkManifest > 0
return n.Flags&FlagIsChunkManifest > 0
}
func (n *Needle) SetChunkManifest() {
n.Flags = n.Flags | FlagChunkManifest
func (n *Needle) SetIsChunkManifest() {
n.Flags = n.Flags | FlagIsChunkManifest
}