I've been looking for a way to monitor file uploading information without using flash, but probably using ajax, i suppose. I want to monitor speed and percentage of finished file upload.
Do you know of any resource that describes how to do that, or what i should follow to do it ?
In the pre-HTML5 world I believe this requires web-server support. I've used this Apache module successfully in the past:
http://piotrsarnacki.com/2008/06/18/upload-progress-bar-with-mod_passenger-and-apache/
The only way without flash is to do it on the server. The gist is:
Start the file upload
Open a streaming connection to the server
Have the server read the post headers to tell you how large the file is going to be
Have the server repeatedly check the file size (in /tmp generally) to see how complete it is
stream the % done back to the client
I've done it before in other languages, but never in ruby, so not sure of a project that's done it, sorry.
Related
My application needs to send big files (>2GB) to a webserver. I tried to receive the file with a php script on server side, but the file size exceeds the php limit. Sadly, my server hoster does not allow me to increase the file size limit that much.
So, it seems the only possible solution is using FTP. But when using FTP, I need to store the credentials in the source code and someone could reverse engineer my software and get the credentials.
I didn't find any suitable and safe solution for this. Can someone give me a hint how this should be done?
I'm using lighttpd on an embedded device with relatively low amounts of RAM and flash storage, and I'm running into the issue with Lighttpd where it's buffering to disk(or RAM) the entire file upload and the system is running out of space. When using apache, it will essentially stream through the data directly to the CGI program, which is what I need.
From my research, I haven't been able to find any way to configure lighttpd (or nginx) in order so that it will not buffer the entire file upload, but rather pass it directly or stream it to the CGI program which will consume it.
The application is a system upgrade which will be written directly to a certain area of flash by the CGI program, but I simply don't have the space for any type of buffering/caching which seems to be required by the lightweight web servers I have looked at.
Does anyone know of a way to avoid this buffering with lighttpd/nginx or other lightweight web server ?
The Nginx Upload Module was written to handle these types of situations but it appears abandoned by the author and apparently does not work with Nginx 1.3.9+
The Nginx Big Upload Module is an extension to the Nginx Lua Module to handle this.
If you prefer to do things yourself, you can try the Lua Resty Upload extension to the Nginx Lua Module written by the author of the Lua Module himself.
Since lighttpd 1.4.40 (released July 2016) server.stream-request-body = 2
See lighttpd server.stream-request-body doc
(old question, but it came up at the top of a search, so I am updating with an answer)
I am trying to do a loadtest on QC11.5 application using Neoload, While recording request are being captured but response body not been stored.
<<body not stored by Neoload >> Error
please help to resolve this issue
Hum... It sounds like a well-known project ;> Here is a summary for the other readers. Hewlett Packard Quality Center 10 or 11 is not a "full" web application. It is kind of local application, installed through Internet Explorer with .cab and .ocx using a HTTP tunnel. The problem to load test it is that the dialog sent by this fat client is fully encrypted. For NeoLoad, an encrypted conversation (over HTTP or HTTPS) is considered as binary and it is not stored in the design. But it is clearly showed in the "Check VU" step. Here we speak about an "alien" encrypting service on top of standard services like SSL, where NeoLoad performs well.
For the readers, to put it in a nutshell, QC cannot be load tested with a network-based approach, like all the majors and professional load testing tools do. Here it is one of the rare situations where a synchronized functional test could be the solution... with hundreds or thousands of desktops.
I've seen lots of questions and answers about this topic, but unfortunately none of them seem to fit my needs closely enough. This question is about both iOS and vb2010.
I have created an app which communicates with my server (at this point, "my server" is actually my Win7 machine that I am using for development. Eventually it will move to an actual server). The back end is a VB program that interfaces between the iPhone app and a SQL Server database. A specific port is open to the computer, and everything there works great. I am able to retrieve data from the database and display it on the iPhone with the app, and also able to save records from the app to the database. It's all so very cool, and I'm really jazzed about it.
The final phase of the project requires uploading a camera image to the server. This is the part where it gets funky for me.
So far I have been able to save the image as a file on the iPhone's disk. Now I need to understand better how to transfer that file to a directory on the server.
I know that there are many techniques that use the "post" method, but as I understand it, that requires a PHP or ASP page to accomplish. FTP generally uses ports 20 and 21. What I would really like is to be able to set up the existing software to receive an upload request from the app, and then place itself in receive mode. This would not require opening another port, and I can tailor the VB code to handle the file however I like.
All I really need to understand is, how can I get the two programs to do the file transfer? And is it reasonable to assume that I can use the same port?
I'm implementing ubr upload. It used Perl and PHP to upload files with a progress bar. I'm running a lighttpd development server and would like to test it fully. Currently it just transfer the files instantly since its really just moving files on my computer. Is there a way to make it seem like it actually transfers it slowly so I can watch the progress bar?
I tried adding the following to my lighttpd.conf. It may have slowed down loading the pages a little, but uploads are still instantanteous.
$HTTP["host"] == "localhost" {
server.kbytes-per-second = 8
}
Thanks
Instead of throttling things on the server side, you could try throttling your client machine. There's a nice article on how to throttle bandwidth on macs over at O'Reilly:
Exploring the Mac OS X firewall
ipfw is a BSD thing, but on Linux you could try using the shaper module and shapecfg:
Traffic Shaping Basics
$HTTP['host'] contains the host of the server. You could put the config variable in the configuration file without the host check.
Thanks for the help! Actually, I'm dual booting and just tested my exact script on my apache server. When I transfer a 200mb file on apache it actually displays the progress bar as the file transfers. On my lighttpd server, the page is "busy" as it posts the file in the background, then the bar pops up as 100% complete.
I think the way the script works is that CGI posts the file, and as it is doing that it keeps writing the size it has written into another file. Then a php script is being called every second which opens this file and looks at how much has been written.
It seems like my lighttpd server is not allowing perl and php to work at the same time.. I may be wrong though.
On my windows server I actually installed WAMP and perl. My lighttpd is using fastcgi for the php and just mod_cgi module for the perl scripts.
Ah it looks like other people have issues with lighttpd and uber uploader...
(can't link to it since I'm new)
Now the question is if lighttpd is worth using since I'll have to change this on top of all my mod_rewrite stuff.
Try using charles: http://www.charlesproxy.com/
You can limit your browser bandwidth by using the Sloppy HTTP proxy: http://www.dallaway.com/sloppy/
Sloppy deliberately slows the transfer of data between client and server.
Example usage: you probably build web sites on your local network, which is fast. Using Sloppy is one way to get the "dial-up experience" of your work without the hassle of having to install a modem.