Answer the question
In order to leave comments, you need to log in
Why can't I upload multiple photos to an album with one POST request?
Such a problem: only one file from the list with file data is loaded into the album.
multiple_files = [
('images', ('foo.png', open('foo.png', 'rb'), 'image/png')),
('images', ('spam.png', open('foo.png', 'rb'), 'image/png')),
('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
request = requests.post(upload_server, files=multiple_files).json()
api.photos.save(album_id=self.album_id, **request)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question