Python Requests | Upload a File

preview_player
Показать описание
The Requests library has the ability to post multipart encoded files using the API for the http Post protocol. File upload is a common input for forms on a website and the Requests library makes it simple to send the files within a Post request.
Рекомендации по теме
Комментарии
Автор

I spent about an hour reading through various examples trying to figure out how to do this. Two minutes into this video I had my answer. You just earned a new subscriber.

TheBakerbug
Автор

Brother your course is awesome I literally spend around 1 month here and there but you mader it to me in 3 days, grand salute to you.


Btw can you tell me your theme name i kinda like it 😁

daraspratapsingh
Автор

Man, you're the best!!! Thanks a lot

fawwazaerysulthansyah
Автор

I really appreciate the tutorial but it covers (as with almost every other tut on YouTube and the internet in general) posting to a test URL. Can someone suggest a tut that explains how to use python request to post to one's own web server, e.g. a hosted web server on say Godaddy? I'm guessing that you'd have to send the data to a PHP file on the server but again its very hard to find a detailed tut that explains the details in the same way this tut does for a test server.

hitlab
Автор

Does anyone know why created a dictionary at 1:04? My code doesn't work with the curly brackets and dictionary. However if I removed those and simply do files = open('test.csv', 'rb'), it works.

chieh-julin
Автор

Dear Harsha, my name is Ricardo. I watched your video and I still can't get my doubts cleared. I will explain my problem to see if you can help me.
I built an API in PYTHON and it does the following:
1. Receive an image, save this image in a folder and identify this image, following some criteria.
Do you think it's possible for me to make an endpoint, which receives the image and then responds to the identification?

saibademais
Автор

Can we view the uploaded file in site?

sidharths
Автор

Hi. When sending a file to the server, I get a 403 status error. Is it possible to circumvent it somehow?

madclips
Автор

obrigado por compartilhar esse conteúdo me ajudou bastante

devlopes
Автор

I am unable to access the url. Please let me know how to resolve it. Thanks

anonnewuserp
Автор

What about files that are 1gb in size?

BethellJack
Автор

Hi, how can we get uploaded file link ? Thank you

RajKumar-bpgy
Автор

ok but how do i see the uploaded image in my browser?

mateotolosa
Автор

how did you specify the headers? are they generated automatically?

iqbotdemo
Автор

Hi good video. What if you have to do it by rows and a pair of data. For example the brand name and the value of the first brand how you tell that only took the two values and send that first? thanks

jonathanfriz
Автор

suppose when i give the url it is asking for username and password, in that case how to pass the username and password. Please help

venkikrish
Автор

If I want to upload file with auth URL so what should I do

priyashegokar
Автор

A very good and you informative video but, Alas! contents are not visible, so only commentary is coming.

jk
Автор

The quality of the video is bad. I am not able to read the text on the screen. @PyPros should have uploaded this content in 1080p.
The audio is very clear though !

g.s.bennabhaktula