В моем интерфейсе файл отправляется на сервер, когда я пытался получить доступ к словарю ** kwargs, я вижу файл, полученный на сервере, но когда я пытался получить доступ к файлу через info.context.FILES его отправка пустой список, в котором есть файл с моим кодом:
class CreateAgency(graphene.Mutation):
id = graphene.UUID()
authorName = graphene.String()
authorEmail = graphene.String()
authorPhone = graphene.Int()
agencyName = graphene.String()
agencyAddress = graphene.String()
thefile = Upload() #graphene.String()
agencyLandlineNumber = graphene.Int()
agencyEmail = graphene.String()
agencyWebsite = graphene.String()
userId = graphene.UUID()
class Arguments:
authorName = graphene.String()
authorEmail = graphene.String()
authorPhone = graphene.Int()
agencyName = graphene.String()
agencyAddress = graphene.String()
thefile = Upload() #graphene.String()
agencyLandlineNumber = graphene.Int()
agencyEmail = graphene.String()
agencyWebsite = graphene.String()
userId = graphene.UUID()
#@classmethod
@staticmethod
def mutate(self, info, **kwargs): #self, file, info, **kwargs
authorName = kwargs.get('authorName')
authorEmail = kwargs.get('authorEmail')
authorPhone = kwargs.get('authorPhone')
agencyName = kwargs.get('agencyName')
agencyAddress = kwargs.get('agencyAddress')
thisfinal = kwargs.get('thefile') #file string
#files = info.context.FILES.get(file)
#files = kwargs.context.FILES['thefile']
agencyLandlineNumber = kwargs.get('agencyLandlineNumber')
agencyEmail = kwargs.get('agencyEmail')
agencyWebsite = kwargs.get('agencyWebsite')
userId = kwargs.get('userId')
print(type(thisfinal))
#print(info.context.FILES['thefile'])
#print(info.context.FILES)
print(kwargs)
#print(context)
print(info.context.FILES.getlist('thefile'))
print(info.context.FILES)
if info.context.FILES and info.context.method == 'POST':
getFile = info.context.FILES['thefile']
print("#######################")
print(info.context.FILES)
print(kwargs)
print(self)
#print(context)
print(getFile)
print("#######################")
#print(files)
#print(thisfinal)
print("#######################")
print(agencyName)
print("#######################")
actionCreate = realEstateAgencies(
authorName = authorName,
authorEmail = authorEmail,
authorPhone = authorPhone,
agencyName = agencyName,
agencyAddress = agencyAddress,
angencyLogo = thisfinal,
agencyLandlineNumber = agencyLandlineNumber,
agencyEmail = agencyEmail,
agencyWebsite = agencyWebsite,
#userId = userId
)
actionCreate.save()
return CreateAgency(
id = actionCreate.id
)
class AgencyCreateMutation(graphene.ObjectType):
createagency = CreateAgency.Field()






Вы в этом разобрались? Куда вы положили свои файлы? Я даже не знаю, куда их положить.