285 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
129
views
How to make my Node.js + React app open documents such as .pdf or .doc in browser?
I am looking to display a list of available documents to the user that they can choose to either view in browser or download to their device. The downloading part is already done and working, however ...
2
votes
1
answer
152
views
How to add custom headers with JSON and file response in the same endpoint?
I tried using send_file to send the file and setting custom headers, but Flask only allows returning one response body, so it seems like the headers are not being sent when the file is returned.
I ...
0
votes
1
answer
114
views
linux sendfile sometimes reports EPIPE
I am writing a small file server. I was using the usual read/write but am now experimenting with sendfile(2).
Even though it works fine 100% of the time and I see a nice 2x speed improvement, ...
4
votes
1
answer
109
views
Is there any difference between Linux's sendfile() and Oracle Solaris' sendfile()?
I have read Linux's man page and Solaris' man page.
What I found different was this requirement in Linux's man page:
The in_fd argument must correspond to a file which supports
mmap(2)-like ...
1
vote
0
answers
39
views
Is there a way to avoid android(13) pairing window and do it by device address automatically?
The following program section (java) is working fine, the file can be received, I just want to get rid of choosing device manually.
I wonder if there is a simple way using intent.putExtra with device ...
0
votes
1
answer
55
views
FileNotFoundError while using send_file in a Flask app
This error shows
Here is my code:
<p>
<a href="{{ url_for('views.download_csv', semester_name=semester.semester_name) }}">Download CSV File</a>
</p>
...
0
votes
0
answers
119
views
Encountering CORS Errors When Calling Flask Sending File API from Browser, But It Works in Postman
I am developing a Flask application and have implemented CORS support.
Everything works fine when I test my API using Postman.
However, when I attempt to make requests via a browser, I encounter CORS ...
0
votes
0
answers
196
views
would sendfile be better if we have to write data that is already in memory?
i am having some data in user space memory buffer that i want to send through socket. i was reading about zero copy in Linux, was wondering it is possible to use it in this case or any optimisation ...
-1
votes
1
answer
156
views
Does Zig's fifo.pump support sendfile?
Zig has fifo.pump() which takes a reader and a writer? Does this support sendfile optimizations on Linux in any case?
0
votes
0
answers
763
views
Why doesn't nginx use sendfile with sendfile on?
There is following nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 4096;
multi_accept on;
}...
2
votes
1
answer
3k
views
Zero copy in sockets
I am writing a network application that will transfer data between a pair of sockets.
Whenever some data is available in the source socket, it will transfer it to the destination socket and vice versa....
0
votes
1
answer
592
views
send txt file in telegam via request website to telegram bot
I want to send a file using a request website(https://www.httpdebugger.com/tools/ViewHttpHeaders.aspx) and a bot in telegram
for example this code is for sending a massage in roobt :
TEXT = input('...
0
votes
1
answer
45
views
send_filer return None or ended without a return statement
I am trying to do a aplication where the user can dowload a plot.png and a file.csv but send_files doesnt work. Here are my python code:
app = Flask(__name__)
app.USE_X_SENDFILE = True
@app.route('/',...
0
votes
1
answer
615
views
Error with send_file using flask in Python
I have an application where, through a server, the user needs to download a CSV file and an image that is stored in the same directory as the .py file but it doesn ́t work.
Here are my python code:
app ...
0
votes
0
answers
81
views
flask - send gzipped image
below you can find my old code (working) and my new code (not working). problem with the old code is that the images are 500 kb each and are provided while scrolling (lazy loading), so use up a lot of ...