20 ms·
>>t's not hard to > LOOOOOOOOL ? I've done it a few times. It worked fine on Nokia S40 and the version of J2ME they run can't even seek backwards in files. I
by toast0 20d ago
>>t's not hard to
> LOOOOOOOOL
? I've done it a few times. It worked fine on Nokia S40 and the version of J2ME they run can't even seek backwards in files.
It's a three part recipe:
a) send a request to upload with whatever auth you need, some stable identifier for the file and the file size. Ideally a nice checksum to confirm the file was not corrupted in transit; TLS should protect you, but I've seen things, a 32-byte sha256 checksum offers protection from a lot of things.
b) if the upload is unfinished, you'll get a url (or whatever) to post to and a starting offset (0 on the first time); if the upload is complete, you'll get a download url to send to your correspondent. (or an error like file too big, try again later, go away, whatever)
c) upload the file to the url. Maybe get a status if the upload finishes and you're still online to receive it. Status could indicate error or a download url. If you timeout or get a retriable error, go back to part a.
It's not rocket science or anything. Maybe it would be hard to get done in the XMPP ecosystem, but it's simple enough to do with any stack that's got big enough media that resuming uploads is relevant.
- aboardRat4 20d agoyeah, yeah, yeah. Now tell your girlfriend's mother to do the same.