Get multi-page recording with Google engine

I want to receive a message with several files from the image downloader. ( I use this ) Most examples show how to get one image from a message.

I tried many ways but never got results. for example

self.request.POST['Filename']

gives only the first file name.

What if there are several files / images in the message?

The reason for this is resizing before uploading images that are too large for the Google engine. For loading.

EDIT:

self.request.POST.multi.__dict__

shows

{'_items':
[('Filename', 'camila1.jpg'),
('Filedata[]', FieldStorage('Filedata[]', 'camila1.jpg')),
('Upload', 'Submit Query\r\n--negpwjpcenudkacqrxpleuuubfqqftwm----negpwjpcenudkacqrxpleuuubfqqftwm\r\nContent-Disposition: form-data; name="Filename"\r\n\r\nbornToBeWild1.jpg'),
('Filedata[]', FieldStorage('Filedata[]', 'bornToBeWild1.jpg')),
('Upload', 'Submit Query')]}
+3
source share
4 answers

Flash- PHP Filedata [] (php )

, :

def post(self):
  for file_data in self.request.POST.getall('Filedata[]'):
     logging.info(file_data.filename)

file_data.value

+3

Django ? , .

+1

self.request.POST.getall('Filename'), FieldStorage; . .value, mimetype .type.

+1

, , , , . , . , , , , .

, 2 "Filename0" "Filename1". firebug, , .

: flash. , .

0

Source: https://habr.com/ru/post/1718999/


All Articles