|
@@ -37,6 +37,8 @@ namespace TEAMModelOS.Controllers
|
|
|
private readonly DingDing _dingDing;
|
|
|
private readonly Option _option;
|
|
|
int baseSpaceSize = 1; //學校保底空間大小(1G)
|
|
|
+ private readonly double bytes = 1073741824;
|
|
|
+
|
|
|
public SchoolController(AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, DingDing dingDing, IOptionsSnapshot<Option> option)
|
|
|
{
|
|
|
_azureCosmos = azureCosmos;
|
|
@@ -1044,7 +1046,7 @@ namespace TEAMModelOS.Controllers
|
|
|
itemSize = itemSize != null ? itemSize : 0;
|
|
|
otherSize = otherSize != null ? otherSize : 0;
|
|
|
studentSize = studentSize != null ? studentSize : 0;
|
|
|
- usedSpace = Convert.ToInt32(Math.Ceiling((double)((docSize + videoSize + imageSize + paperSize + itemSize + otherSize + studentSize) / 1073741824)));
|
|
|
+ usedSpace = Convert.ToInt32(Math.Ceiling((double)((docSize + videoSize + imageSize + paperSize + itemSize + otherSize + studentSize) / bytes)));
|
|
|
teacherSpace = avaliable - usedSpace;
|
|
|
}
|
|
|
}
|