0

How I Can Send SomeFile To Link My Website

Hi Guys I Need send file.txt to link to my website with python how i can do it? please

21st Nov 2019, 4:09 AM
zoal raghe
zoal raghe - avatar
3 ответов
+ 1
I guess you're looking for something like Flask framework, to answer the given link (get request) with your file. But I agree with 𝕵𝖆𝖓 𝕸𝖆𝖗𝖐𝖚𝖘, you need to be more clear.
21st Nov 2019, 8:16 AM
Gonçalo Magalhaes
Gonçalo Magalhaes - avatar
0
import requests url = 'https://zoalraghe.000webhost.com/post' files = {'file': ('link.txt', 'some,data, to,send\nanother,row,to,send\n')} r = requests.post(url, files=files) r.text { "files": { "file":"some,data,to,send\\nanother,row,to,send\\n" }, } i have this code but can't sending 😭😭
22nd Nov 2019, 1:31 AM
zoal raghe
zoal raghe - avatar