Open 17186765070 opened 2 years ago
There are different types of files, eg: Url, Stream, Base64 and Local file. There is a simple way for you to get the size of file:
# step 1
file = file_box.to_file()
# step 2
file_size = os.path.getsize('d:/file.jpg')
print("File Size is :", file_size, "bytes")
Hope it can help you fix your problem.
Thank you for your reply @wj-Mcat
If I use to_ File() ,One of the problems I encounter now is that if the file is too large, the program will fail.
Therefore, I want to get the file size first. If it exceeds 2m, then I decide not to file_box.to_file() the file
@17186765070 yes, I’m sorry to say that there are some issues when solving big files, but we will fix it in next few days. You can keep eyes on this issue to get latest progress.
requirements
Describe your problem
Reproduce your problem