upload 上传 签名 直接上传都可以
This commit is contained in:
@@ -56,15 +56,15 @@ func FormatS3KeyNameUser(userid int64, now time.Time, env string, category TypeC
|
||||
return fmt.Sprintf("/%s/%s/%d/%s.%s", env, category, userid, name, ext)
|
||||
case TCategoryRenderMegre:
|
||||
// /{env}/render_megre/{userid}/{filename} 自动删除
|
||||
return fmt.Sprintf("/%s/%s/%d/%s_%d.%s", env, category, userid, name, now.Unix(), ext)
|
||||
return fmt.Sprintf("/%s/%s/%d/%s_%d.%s", env, category, userid, name, now.UnixNano(), ext)
|
||||
case TCategory3DTools:
|
||||
// /{env}/3dtools/年月/{userid}/{filename}
|
||||
return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), userid, name, now.Unix(), ext)
|
||||
return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), userid, name, now.UnixNano(), ext)
|
||||
case TCategoryQuotation:
|
||||
// /{env}/quotation/年月/{userid}/{filename}
|
||||
return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), userid, name, now.Unix(), ext)
|
||||
return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), userid, name, now.UnixNano(), ext)
|
||||
default:
|
||||
return fmt.Sprintf("/%s/%s/%d/%04d%02d/%s_%d.%s", env, category, userid, year, int(month), name, now.Unix(), ext)
|
||||
return fmt.Sprintf("/%s/%s/%d/%04d%02d/%s_%d.%s", env, category, userid, year, int(month), name, now.UnixNano(), ext)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -87,17 +87,17 @@ func FormatS3KeyNameGuest(guestid int64, now time.Time, env string, category Typ
|
||||
return fmt.Sprintf("/%s/%s/%d/%s.%s", env, category, guestid, name, ext)
|
||||
case TCategoryRenderMegre:
|
||||
// /{env}/render_megre/{guestid}/{filename} 自动删除
|
||||
return fmt.Sprintf("/%s/%s/%d/%s_%d.%s", env, category, guestid, name, now.Unix(), ext)
|
||||
return fmt.Sprintf("/%s/%s/%d/%s_%d.%s", env, category, guestid, name, now.UnixNano(), ext)
|
||||
case TCategory3DTools:
|
||||
panic(TCategory3DTools + "不存在游客")
|
||||
// /{env}/3dtools/年月/{guestid}/{filename}
|
||||
// return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), guestid, name, now.Unix(), ext)
|
||||
// return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), guestid, name, now.UnixNano(), ext)
|
||||
case TCategoryQuotation:
|
||||
panic(TCategoryQuotation + "不存在游客")
|
||||
// /{env}/quotation/年月/{guestid}/{filename}
|
||||
// return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), guestid, name, now.Unix(), ext)
|
||||
// return fmt.Sprintf("/%s/%s/%04d%02d/%d/%s_%d.%s", env, category, year, int(month), guestid, name, now.UnixNano(), ext)
|
||||
default:
|
||||
return fmt.Sprintf("/%s/%s/%d/%04d%02d/%s_%d.%s", env, category, guestid, year, int(month), name, now.Unix(), ext)
|
||||
return fmt.Sprintf("/%s/%s/%d/%04d%02d/%s_%d.%s", env, category, guestid, year, int(month), name, now.UnixNano(), ext)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user