Linked Questions

1 vote
1 answer
13k views

first excuse me for my bad english (i speak spanish). I am trying submit a form uploading with an image. When i want send normal data (how text string) i do this: First import modules: import ...
erni's user avatar
  • 176
0 votes
1 answer
2k views

i work on a little flask app, which consists in searching docs with keywords (ElasticSSearch) and upload docs in cluster. Searching docs works fine but upload is hard, i can do it with curl but i ...
VanCleef's user avatar
0 votes
0 answers
172 views

I have 3 servers, at A server, I choose a image in the browser and POST it to the B server using urllib2, at B server,I get the image POST from A and make some changes to it, then POST to C server, C ...
Jinvan's user avatar
  • 33
215 votes
24 answers
484k views

Is there a way to generate random letters in Python (like random.randint but for letters)? The range functionality of random.randint would be nice but having a generator that just outputs a random ...
Kudu's user avatar
  • 6,958
279 votes
9 answers
664k views

I'm performing a simple task of uploading a file using Python requests library. I searched Stack Overflow and no one seemed to have the same problem, namely, that the file is not received by the ...
scichris's user avatar
  • 2,947
76 votes
4 answers
214k views

I am writing some code to interface with redmine and I need to upload some files as part of the process, but I am not sure how to do a POST request from python containing a binary file. I am trying ...
Mac's user avatar
  • 3,599
16 votes
2 answers
9k views

In an HTML form post what are valid characters for creating a multipart boundary?
lajos's user avatar
  • 25.7k
6 votes
3 answers
22k views

Using CURL I can post a file like CURL -X POST -d "pxeconfig=`cat boot.txt`" https://ip:8443/tftp/syslinux My file looks like $ cat boot.txt line 1 line 2 line 3 I am trying to achieve the same ...
user1191140's user avatar
  • 1,599
5 votes
5 answers
14k views

I'm interested in writing a short python script which uploads a short binary file (.wav/.raw audio) via a POST request to a remote server. I've done this with pycurl, which makes it very simple and ...
si28719e's user avatar
  • 2,165
7 votes
3 answers
16k views

This is an almost-duplicate of Send file using POST from a Python script, but I'd like to add a caveat: I need something that properly handles the encoding of fields and attached files. The solutions ...
zellyn's user avatar
  • 1,432
9 votes
2 answers
9k views

Introduction Background I'm writing a script to upload stuff including files using the multipart/form-data content type defined in RFC 2388. In the long run, I'm trying to provide a simple Python ...
MvG's user avatar
  • 61.8k
2 votes
1 answer
8k views

Hi I'm having trouble posting a text file using the Python Requests Library ( http://docs.python-requests.org/en/latest/index.html ), can you let me know what I'm doing wrong? I tried searching for ...
user avatar
3 votes
1 answer
12k views

I have the following code in C# that I need to convert into Python. Code in C#: { var fileName = new FileInfo(file); string requestString = "url to be used&...
s_7's user avatar
  • 43
2 votes
1 answer
7k views

Here I'm trying to use requests.post for file upload. Wrote procedure. import requests def upload_file_to_gcs(): url = 'http://127.0.0.1:8500/save-data-to-gcs/' f = {'file': ('Product_Master....
Niks Jain's user avatar
  • 1,647
3 votes
2 answers
4k views

So the process I'm performing seems to make logical sense to me but I keep getting an error. So I have this binary file I'm trying to send to a server (Shapeways to be exact. It's a binary 3d model ...
Jared Joke's user avatar
  • 1,366

15 30 50 per page