Python Django模型文件字段->;将文件从一台服务器上载到另一台服务器

Python Django模型文件字段->;将文件从一台服务器上载到另一台服务器,python,django,django-models,django-rest-framework,django-forms,Python,Django,Django Models,Django Rest Framework,Django Forms,我试图将FileField字段的内容上载到第三方服务器,但我在第三方服务器端得到了空二进制文件 假设我有一个FileManager表,它以file作为列 模型架构: class FileManager(models.Model): file = models.FileField(upload_to=file_input_path) .... 现在假设我有一个函数,它从file_manager表中获取某个特定行,并将该特定文件上载到某个第三方服务,如下所示: def so

我试图将
FileField
字段的内容上载到第三方服务器,但我在第三方服务器端得到了空二进制文件

假设我有一个
FileManager
表,它以
file
作为列

模型架构:

class FileManager(models.Model):
    file = models.FileField(upload_to=file_input_path)
        ....
现在假设我有一个函数,它从file_manager表中获取某个特定行,并将该特定文件上载到某个第三方服务,如下所示:

def some_task():
   some_file = FileManager.objects.get(id=some_id)
   some_file.file.name = "Some Random custom name"
   form_data = {
       "file": some_file.file,
   }
   print(form_data['file'].read()) # it is printing empty binary b''
   requests.post("xyz.com/process_file", files=form_data)
#第三方服务

class 
def process_file(request):
    data  = request.FILES['file']
    print(data.read()) #Getting empty binary as-> b''
    print(data.name) #printing correct name -> some_file.xlsx
如何访问
FileField
列的内容

目前我正在使用
FileField.file
访问此文件,但在读取其内容时,它显示空二进制b“”