Attachements of E-Mails send to categories nicely shown but not uploaded to folder

סיכום מבוסס בינה מלאכותית

A user is experiencing an issue with email attachments not uploading to the desired folder in Discourse. When an email with attachments is sent to a category, the attachments appear in the topic overview but return a 404 Not found error when clicked. The logs show no errors, and the files do not appear in the ../public/uploads/default/original/1X/ or /tmp/ folders. The user has found the relevant code location (LOC) but is unsure how to proceed with debugging. They note that adding attachments through the frontend works correctly.

Hello you*s,
my problem is, that I send an mail with an attachment to an email address that’s connected to a category. Everything works just beautiful the Mail will show up in the Topic overview, the text gets preciously rendered. And you will see the attachments nicely added to the topic (pdf links directly into ../public/uploads/default/original/1X/ with a well generated hash, e.g.9559e1bdae42ab7b2e6bb406e0093ebc6e2f740e.pdf and images are inlined and shortUrl’ed :+1: ) But if I klick on said files the unexpected happens: :japanese_ogre: 404 Not found :broken_heart: and the inline’d images wont show up.

I go down the tube a little bit. The logs look pretty harmless: Text gets rendered,… etc.:

Started POST "/admin/email/handle_mail" for 173.55.78.161 at 2020-06-11 11:53:19 +0000
Processing by Admin::EmailController#handle_mail as */*
  Parameters: {"email"=>"[the whole email source with attachements-base64]"}
  Rendering text template
  Rendered text template (Duration: 0.0ms | Allocations: 1)
Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.0ms | Allocations: 1399)

but the files never arrive in ../public/uploads/default/original/1X/ nor in /tmp/ :sob:. (So it’s totally clear that the links in the topics-view won’t spitt out the files.)

I don’t have any idea where to go on in debugging the issue. (Since discourse/mail-receiver “pushes” the email nicely to discourse I exclude it from further negociations.) I already found the LOC where the creation of file should happens (at least in tmp-folder) but it won’t (and no error is thrown). It is also to mention, that if I add attachments to topics by front-end everything works like charm and the files ends up in the uploads-folder :dart: :star_struck:

Do you have any hints on where I can go on searching debugging? Or heard of such abandoned :dash: mail attachments before?