Questions tagged [sendfile]

sendfile is the general function representation of sending data/file over the network. The network may be raw tcp sockets or any other connection itself. This tag should be used for querying about such file sending methods defined in different web/(android etc.) frameworks

279 questions
0
votes
1 answer

How to send some files with telegram bot in python

I'm trying to upload the outcomes of my code (they are images) in a group with a Telegram bot. I've tried: import requests import numpy as np paths=np.array([]) for z in range(8): …
user15819643
0
votes
1 answer

flask send_files() doenst open download tab

i created a little web app that allows to upload and download files (pdf,txt,docx) to a sqlite3 database. I use flask as backend framework. When i hit the download button the download route gets called and everything seems fine but the download tab…
Revero
  • 1
  • 2
0
votes
1 answer

Rails send_file not sending data when called through a web service

I am in a strange situation where send_file is unable to send file correctly. Here is situation: Rail version: 3.0.10 and 3.1.0 [two different branches for testing] Ruby: 1.9.2 on RVM Webserver: Apache with Passenger My client has a document…
Chandresh Pant
  • 1,173
  • 15
  • 19
0
votes
1 answer

send multiple files to a telegram channel in a single message using bot

I'm trying to send 3 files to a chat, bt I'm not even able to send a single file. I tried this code import requests url = "https://api.telegram.org/botxxxxxxxxxxxxxxx/sendDocument" payload = { "chat_id": "xxxxx", "document":…
Ajesh
  • 43
  • 10
0
votes
1 answer

Android send image file (in the custom data class) to server with retrofit and rxjava

I want to send image to sever with retrofit. But my image is in the custom class Below is my 2 data class. I want to send LawRegRequest class to server. And in this class have lawyer field which is LawyerModel. And my image field (lawyer_card) is in…
0
votes
2 answers

sending xml file from php to an android application

I am trying to send an xml file as a httpresponse to a post from an android application. I understood how to send data from a php page here. Is it possible to send a xml file as a response? Or do I have to send the content of xml file as a string…
Brahadeesh
  • 2,245
  • 8
  • 40
  • 58
0
votes
1 answer

Cannot upload file using multipart/form-data and Flask

I'm not able to upload files through a simple form, using Flask. I wrote below the simplified code of the html: Debug
0
votes
1 answer

How to 'pipe' or 'chain' output of a server socket to the input of another server socket similar to sendfile?

In Linux, using sendfile you can directly transfer file out to a socket. But let's say we have two server socket, we want to the output of the first one to go out to the second one. How to do that? Instead of data=sock1.read() sock2.write(data)
Yichuan Wang
  • 723
  • 8
  • 15
0
votes
0 answers

sendfile() with files (Linux)

I tried this sendfile example: https://github.com/pijewski/sendfile-example/blob/master/sendfile.c I noticed, I can use sendfile with normal files and it works as expected. I thought, on Linux, it can be used only if destination is network…
Nick
  • 9,962
  • 4
  • 42
  • 80
0
votes
1 answer

Sending files from a client to a server and then reading the file in another client using sockets in C

There are two clients and a server in the application. The two clients communicate with each other via the server. When one client sends a message to the server, the server stores the message as a text file in the server, where file name is…
0
votes
2 answers

How to upload a file picked by file_picker in flutter

I need to send an attachment to an email picked by file_picker from flutter. How to send the file. Padding( padding: EdgeInsets.fromLTRB(20, 10, 20, 10), child: RaisedButton( elevation: 0, onPressed: ()…
0
votes
1 answer

Vuejs not loading image completely from backend API

Context: I've got a WebApp (frontend: Vue3, backend: node.js + express) with a single vue, and a button. When clicking on a button it triggers a script in the backend, downloading an image, and storing it locally. This image should be rendered on…
Henri
  • 1,571
  • 5
  • 23
  • 38
0
votes
0 answers

Vue - How to display image received from backend API?

I'm building a webApp in MEVN stack (Mongo, Express, Vue, Node). In my backend, I have a controller (./backend/controllers/screenshots.controller.js) downloading an image from an external REST API. The image (PNG) is downloaded in a directory called…
Henri
  • 1,571
  • 5
  • 23
  • 38
0
votes
2 answers

Send multiple files from one API to another with NodeJS , multer and Axios

I have an API in one nodejs project as below which receive multiple attachment from UI: const upload = multer() router.post('/upload', upload.array("attachments"),controller.getSomething); getSomething is supposed to call another POST API using…
Gayathri
  • 1,776
  • 5
  • 23
  • 50
0
votes
0 answers

Flask: wait until file will be stored by send_file command

By POST request I am going to let client store generated file to his local HHD by executing send_file() command. Here is the code: def send_file_to(): try: file_name = store_user_list() send_file(file_name, as_attachment=True,…
OcMaRUS
  • 329
  • 3
  • 13