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
Questions tagged [sendfile]
279 questions
1
vote
1 answer
How do I send and receive a file through tcp socket
Now I know that this question has been asked a lot but I really just don't get how to do it. I tried this but the file don't get complete I just receive just a bit of the file and the rest is just NULL here is my code in client part I first send a…

cipher_449449
- 114
- 8
1
vote
1 answer
Python Flask send_from_directory returning corrupted file
We have written code to convert a file from json to excel format and its returning the excel file where as if I try to open the file its corrupted.
We have tried pandas and openpyxl to convert the json.
Below is the sample code tried to check…

user2256907
- 21
- 2
1
vote
1 answer
How To Make a URL for a Video in Flask that Works with HTML?
I have a flask server that has a video file in it. How do I make it so users can watch the video using the HTML
user14210589
1
vote
1 answer
Flask redirect page after response is complete
So I currently have button in my html script that calls the route /return-files. This route returns a response with a zipped file and I also disabled any caching since I had issue with trying to get a new file each time this response is made. This…

Naman Jain
- 321
- 5
- 21
1
vote
2 answers
I am trying to access a folder outside of the current directory of my folder in express js
Their is two folders inside my folder one is made up for front-end and one is for back-end
project
├── back-end
│ ├── public
│ └── routes
│ ├── Calling.js
│ └── index.js
└── front-end
├── public
└── src
└──…

Rahman Haroon
- 1,088
- 2
- 12
- 36
1
vote
0 answers
Python Flask - Uploading, processing and sending files (csv, xlsx, pdf and word) - Best practices
I was wondering if someone can guide me as to what the best practices would be in the following situation:
I am writing a flask application and I would want the user to send me files on a bi-weekly or monthly basis, where files can be either one of…

Bilal Junaidy
- 11
- 4
1
vote
1 answer
Python - save BytesIO in database
So I am trying to create a binary file and save it into my database. I am using REDIS and SQLALCHEMY as a framework for my database. I can use send_file to send the actual file whenever the user accesses a URL but how do I make sure that the file is…

Patch
- 694
- 1
- 10
- 29
1
vote
0 answers
Haskell SendFile zero-copy - Abort the transfert
Hi I want to use the following lib in Haskell for transferring files between nodes : https://hackage.haskell.org/package/sendfile-0.7.11.1/docs/Network-Socket-SendFile.html
I want to be able to abort the sendFile if the file has been transferred by…

Nicolas Henin
- 3,244
- 2
- 21
- 42
1
vote
1 answer
Nginx "direct_io" and "sendfile" effect
How can see the effect of direct_io and sendfile directive on my server? I want to compare with this settings and without. Is there any tool for do it?
sendfile on;
aio on;
directio 512k;
Thanks.

Birkan Tahtacı
- 11
- 1
1
vote
0 answers
sendfile on macOS and gcc
I am try to make most basic FTP feature in c language on macOS host mashine.
I use g++ or gcc compiler. I found c example for linux but sendfile is not the same prototype
like macos system support. I fix include with :
#if __APPLE__
#include…

Nikola Lukic
- 4,001
- 6
- 44
- 75
1
vote
1 answer
Python Flask send pdf file using decoded request.content
I'm having great difficulty downloading files from a sharepoint server in my flask application.
I'm making a get request to the sharepoint api to get the file and it looks successful when I print my download object
But I cant figure out how to…

Rach Odwyer
- 184
- 1
- 14
1
vote
2 answers
Does Amazon S3 help anything in this case?
I'm thinking about whether to host uploaded media files (video and audio) on S3 instead of locally. I need to check user's permissions on each download.
So there would be an action like get_file, which first checks the user's permissions and then…

randomguy
- 12,042
- 16
- 71
- 101
1
vote
0 answers
RestTemplateBuilder: problem sending audio to telegram api
I use RestTemaplteBuilder for send POST request to Telegram Bot API.
There was a problem creating the request to upload the audio file.
According to the documentation - https://core.telegram.org/bots/api#sending-files you need to send a request of…

a1ekseev
- 11
- 2
1
vote
2 answers
How to create dynamic file sending algorithm with flask
I have some problems with file serving with flask.
Firstly, my file tree:
processedMain
--processed1
--processed2
--...
--processedN
In each folder I have bunch of files that I represent it all in table where i put href link with path of each of…

Igor Kolesnikov
- 133
- 1
- 8
1
vote
0 answers
Download Different File with Same Name Get the previous file again and again
I just create a web application that can generate an excel file using XLSXWRITER. It can download the file using send_file command using python. But the problem is whenever i download the file sometimes a rare error occurred like it download the…

Albert Sudirwan
- 31
- 5