Hi,

I'm send a large PDF (70MB) to a browser using write blob.

Whilst this is happening all other users cannot do anything on the server, as soon as the download is finished the other users can access the server fine.

Am I doing something silly?

Obviously 70mb is a large file and I expect it to slow down other users due to bandwidth restrictions, but what we seem to be seeing is all other processes are frozen until this is complete.

Config:


4D 2003.5 Active4D 3.0.1b7 OSX 10.3.8

The PDF is loaded into a blob using this method (pinched from this forum): ($itemid is sent as a query parameter)

<%
set cache control("")
set expires(-1)
query([Items]; [Items]ID = Num($itemid))

$vtFileName := [Items]External_Reference
$vtFileName := replace string($vtFileName; "\\"; "-")
$vtFileName := replace string($vtFileName; "/"; "-")
$vtFileName := replace string($vtFileName; "?"; "-")
$vtFileName := replace string($vtFileName; "*"; "-")
$vtFileName := replace string($vtFileName; "!"; "-")
$vtFileName := replace string($vtFileName; "."; "-")

pm2_log(Table(->[Items]); [Items]ID; get session("UID"); 204; "")

set response header("Content-disposition";"attachment;filename="+$vtFileName+".pdf")
if(not(defined($hires)))
$hires := "no"
end if

write blob(PM2_PDF_TO_BLOB(num($itemid); $hires);"application/pdf")
%>


The function PM2_PDF_TO_BLOB loads the file from disk into a blob and returns that in $0

The blob is sent and received successfully (so it doesn't appear to be a memory error).

Any ideas?

Thanks

James.

Drag And Drop Limited
41 Brook Road
Rayleigh
Essex
SS6 7XJ
http://www.drag-and-drop.com
t: 01268 779648 f: 01268 741675

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to