NfNitLoop / feoblog

A distributed, cryptographically-verifiable blog / social network
Other
71 stars 4 forks source link

Feature: Atomic Post Upload #120

Closed NfNitLoop closed 1 year ago

NfNitLoop commented 1 year ago

Context

Tried to post some photos from my phone this morning.

The post went through, but the photos did not. The first photo failed with an Http 413 (content too large).

So now I'm left with a post that doesn't have photos attached. There's another ticket to allow attaching them after the fact, but there's no guarantee I'll be able to if the metadata for the image is wrong, or I'm unable to reproduce an image with the exact sha256 hash (by converting an HEIC image on my phone to jpeg).

This is caused by the fact that post uploads come in two phases:

Feature

Maybe provide some way to atomically upload the post and all of its attachments? Could enclose them in some wrapper PROTOBUF to get everything together? Though that might not work for posts w/ large attachments? 🤷

NfNitLoop commented 1 year ago

Related bug: It looks like iOS Safari reported one file size and then tried to upload a file of a different size when it came to sending attachments. 😞

NfNitLoop commented 1 year ago

Closing this as "won't do" in favor of #122, which covers more edge cases w.r.t. File quirks.