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
2 answers

Error starting up angular server

I have the following server.js file: var express = require('express'), api = require('./api'), app = express(); app .use(express.static('./public')) .use('./api', api) .get('*', function (req, res) { …
userk
  • 1
  • 2
0
votes
0 answers

vb.net how to send files through tcp connection

I am trying to use a tcp connection to send my files over from one client to another client. How do I go about doing that? I open a file dialog and after selecting the file, I want to it to send it to a connected client via tcp connection. At the…
山本一樹
  • 157
  • 1
  • 3
  • 15
0
votes
1 answer

Browser is not getting redirected with res.sendFile()

In my Express app, when the admin sucessfully logs in, I want him to be sent to his dashboard page. So in the post function, on success, I redirect to admin/ which takes him to the next function So I have: adminRoutes.get('/', function(req, res){ …
CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
0
votes
1 answer

Error: write EPIPE on sendFile()?

I'm using the html-pdf module to generate pdfs, using the following code: var ejs = require('ejs'); var fs = require('fs'); var pdf = require('html-pdf'); var build = function (template, data) { var html = ejs.compile(fs.readFileSync(template,…
Billy
  • 1,104
  • 8
  • 22
0
votes
1 answer

How to get file name?

I am trying to send *.pdf file and save it on second machine. Im using following code to send: IPHostEntry ipHost = Dns.GetHostEntry("127.0.0.1"); IPAddress ipAddr = ipHost.AddressList[0]; IPEndPoint ipEndPoint = new IPEndPoint(ipAddr,…
rafixwpt
  • 155
  • 3
  • 9
0
votes
0 answers

Cannot read file #{Rails.root}/RubymineProjects/project2/public/system/resumes/attach_files/1/original/guide.pdf

i uploaded a pdf file during create a new employee in employeeController but after saving this .i want to download file from show.html.erb by clicking on name of file. show.html.erb Resume: <%=link_to…
Aniee
  • 81
  • 12
0
votes
1 answer

VirtualBox, Nginx, and sendfile: Alternate Solutions

There's a bug in Virtualbox that results in small, static files not being transmitted over shared-folders properly. This purported solution is to add "sendfile off;" to the server/location block in Nginx (or a corresponding fix to Apache/etc...) and…
Dustin Oprea
  • 9,673
  • 13
  • 65
  • 105
0
votes
1 answer

1024 buffer in Bluetooth chat chunks my information ;-(

I use some of the Bluetooth chat samplecode for sending a SMALL (177 byte to 3617 byte) "settings-file" "securly" between apps. when it is under 1024 bit everything works fine: (so the 177 works PERFECT) sendingdevice press "send button" and the…
0
votes
1 answer

Express .sendFile only works in chrome

I want to send a PDF file to the client, I to it with .sendFile from Express. I works good in Chrome, with a Download link chrome save it, with a normal _blank link, chrome open it in a new chrome tab. But in Mozilla, Safari and IE, the Browser…
Varha
  • 11
  • 1
  • 5
0
votes
1 answer

Use sendfile() to copy file with threads or other efficient copy file method

I'm trying to use the Linux system call sendfile() to copy a file using threads. I'm interested in optimizing these parts of the code: fseek(fin, size * (number) / MAX_THREADS, SEEK_SET); fseek(fout, size * (number) / MAX_THREADS, SEEK_SET); /*…
0
votes
1 answer

Python Show webpage on connect to server

I built a server using JavaScript that displayed a webpage when you connected to it. The server sent the htm file upon connection using app.get('/', function (req, res) { res.sendfile('index.htm'); }); Is there a similar function in Python?
putty174
  • 305
  • 5
  • 19
0
votes
1 answer

nginx doesn't stream file through thin runned rails app

Ive a rails 4 app running which is used for file exchange. Its basicly running very well but when I try to download a file that is bigger then some hundred mb its getting slow. I think this is because nginx doenst stream the file it's first loading…
davidb
  • 8,884
  • 4
  • 36
  • 72
0
votes
1 answer

JMETER: Sending Files with Webservice Request

I need to send files with a webservice request. But I don't know how to specify the file int the WebService(SOAP) Request. How can I do that? Or is it possible to use the HTTP Request? Thanks in advance...
SLo
  • 75
  • 1
  • 1
  • 10
0
votes
2 answers

how to download files with different extension with send_file command

I have the following code, I want to download files of different mime types. Ie docx, pdf etc. I have defined my download action, then bellow am trying to get the file extension for which i direct it to the correct mimetype. But this doesnot seem to…
0
votes
2 answers

Android how to send file and params by HttpURLConnection

I'm developing a app, this one send pictures from sd-card but now I need to send some parameters, how can I do this one? // Open a HTTP connection to the URL conn = (HttpURLConnection) url.openConnection(); …
jose suarez
  • 31
  • 1
  • 1
  • 4