BliztGet issue when download image

Blitz3D Forums/Blitz3D Programming/BliztGet issue when download image

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Strange. Probably some kind of timeout. I wouldn't use this per-byte reading code:

	For readWebFile = 1 To bytesToRead
		
			If Not Eof (www) Then WriteByte save, ReadByte (www)
			
			; Call BytesReceived with position and size every 100 bytes (slows down a LOT with smaller updates)
			
			tReadWebFile = readWebFile
			If tReadWebFile Mod 100 = 0 Then BytesReceived (readWebFile, bytesToRead)

		Next


but maybe try to read the entire lot of bytesToRead to a bank, eg:

bank=createbank(bytesToRead)
readbytes(bank,0,bytesToRead)
wr=writefile("mypic.bmp")
writebytes wr,bank,0,bytesToRead
closefile wr
freebank bank

ehrm, it's pseudo code, make sure the parameters are correct before you run it.