fix: 上传文档大小扩大到100MB

This commit is contained in:
shaohuzhang1 2024-04-09 15:21:40 +08:00
parent 5e200b2cec
commit b038f12a52
3 changed files with 9 additions and 9 deletions

View File

@ -24,9 +24,9 @@ default_pattern_list = [re.compile('(?<=^)# .*|(?<=\\n)# .*'), re.compile('(?<!#
class DocSplitHandle(BaseSplitHandle):
@staticmethod
def paragraph_to_md(paragraph):
try:
psn = paragraph.style.name
if psn.startswith('Heading'):
try:
return "".join(["#" for i in range(int(psn.replace("Heading ", '')))]) + " " + paragraph.text
except Exception as e:
return paragraph.text

View File

@ -470,8 +470,8 @@ class DocumentSerializers(ApiMixin, serializers.Serializer):
super().is_valid(raise_exception=True)
files = self.data.get('file')
for f in files:
if f.size > 1024 * 1024 * 10:
raise AppApiException(500, "上传文件最大不能超过10m")
if f.size > 1024 * 1024 * 100:
raise AppApiException(500, "上传文件最大不能超过100MB")
@staticmethod
def get_request_params_api():

View File

@ -85,9 +85,9 @@ function deleteFlie(index: number) {
// on-change
const filehandleChange = (file: any, fileList: UploadFiles) => {
//110M
const isLimit = file?.size / 1024 / 1024 < 10
const isLimit = file?.size / 1024 / 1024 < 100
if (!isLimit) {
MsgError('文件大小超过 10MB')
MsgError('文件大小超过 100MB')
fileList.splice(-1, 1) //
return false
}