]>
Commit | Line | Data |
---|---|---|
20effc67 TL |
1 | local function isempty(input) |
2 | return input == nil or input == '' | |
3 | end | |
4 | ||
5 | if Request.RGWOp == 'put_obj' then | |
6 | RGWDebugLog("Put_Obj with StorageClass: " .. Request.HTTP.StorageClass ) | |
7 | if (isempty(Request.HTTP.StorageClass)) then | |
8 | if (Request.ContentLength >= 65536) then | |
9 | RGWDebugLog("No StorageClass for Object and size >= threshold: " .. Request.Object.Name .. " adding QLC StorageClass") | |
10 | Request.HTTP.StorageClass = "QLC_CLASS" | |
11 | else | |
12 | RGWDebugLog("No StorageClass for Object and size < threshold: " .. Request.Object.Name .. " adding STANDARD StorageClass") | |
13 | Request.HTTP.StorageClass = "STANDARD" | |
14 | end | |
15 | else | |
16 | RGWDebugLog("Storage Class Header Present on Object: " .. Request.Object.Name .. " with StorageClass: " .. Request.HTTP.StorageClass) | |
17 | end | |
18 | end | |
19 |