When uploading a file to use as a feed, the $file needs to be given the flag permanent in the files table. Otherwise, Drupal will delete them after a period of time and users lose their data. The attached patch accomplishes this in the feedapi_node_validate function.

Comments

aron novak’s picture

StatusFileSize
new1.18 KB

I simplified the patch. Let me know if it does the same what you want to achieve.
Also I use the FILE_STATUS_PERMANENT constant.

aron novak’s picture

Also take a look on: #496088: Add tests for file upload ability , this test covers this issue as well.

aron novak’s picture

Status: Needs review » Fixed

rsoden, thanks, this was a serious issue!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.