Discussion Board
Control The File Size
2002-05-14, 11:36
#1
Super Contributor
Hi,
Is there any way to determine the size of the file on the fly and chop it to match the max file size for that particular client phone with a More/Next button? Has anyone implemented this?
Posted by Felicia Leong, felicia@acctrak21.com
RE: Control The File Size
2002-05-14, 11:36
#2
Super Contributor
Posted by Mikael Salo, salo@hotbot.com
I've implemented it and it works just fine. What to do then you wonder?
It's just basic programming in any programming language. Here is an algorithm, in't not complete but you'll understand the general idea...
precondition:
A breaking statement where you say that this is the max_size of charachters you allow in a file.
Algo:
1. Create the file and add headers, templates, and a start paragraph.
2. Push as much info as you want into the file until some counter gets to the breaking point (or when there is no more info to push).
3. Add a link to next page, Add end-pargraph and end-wml tags to it
4. close file, start again from 1 and add the rest of the information you didn't add.
end algo
You must do some programming because you can't just chop things in 1397 byte chunks...
Good luck, Mikael Salo
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules