The smokesignal.events web application

bug: uploading event banners failed most of the time

+16
+16
src/http/handle_blob.rs
··· 732 732 let cid = blob.inner.ref_.link.clone(); 733 733 let size = blob.inner.size as usize; 734 734 735 + // Store the header image locally in content storage immediately 736 + // This ensures the image is available when the event is created/edited, 737 + // without waiting for store_event_header_from_pds to download from PDS 738 + let image_path = format!("{}.png", cid); 739 + if let Err(err) = web_context 740 + .content_storage 741 + .write_content(&image_path, &processed_data) 742 + .await 743 + { 744 + tracing::warn!( 745 + ?err, 746 + cid = %cid, 747 + "Failed to store event header image locally, will be fetched from PDS later" 748 + ); 749 + } 750 + 735 751 // Return JSON response with CID, dimensions, and size 736 752 let response = UploadHeaderResponse { 737 753 cid,