Control The File Size
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, firstname.lastname@example.org
RE: Control The File Size
Posted by Mikael Salo, email@example.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...
A breaking statement where you say that this is the max_size of charachters you allow in a file.
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.
You must do some programming because you can't just chop things in 1397 byte chunks...
Good luck, Mikael Salo