Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
have no idea why this happens, but on the cronjob run, the files, submitted through the webform get deleted.
Can anyone please point me in the right direction to fix it? Can provide extra info on the system settings if necessary.
Comment | File | Size | Author |
---|---|---|---|
#1 | webform_file_status.patch | 1.71 KB | quicksketch |
Comments
Comment #1
quicksketchThanks for the very succinct synopsis. This exact problem is occurring, thanks for pinning it down to cronjobs. In Drupal 6, files are uploaded and then considered "temporary" until put into a permanent state on the server. Since Webform currently only working uploading files when the file field is on the last page, all files uploaded by Webform should be considered immediately permanent, but Webform wasn't setting this flag.
Could you try out this patch and see if it corrects the problem and works smoothly?
Comment #2
quicksketchComment #3
quicksketchComment #4
quicksketchI went ahead and commited this fix with the intent of getting 2.1.2 out shortly.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
sivaramapandianbtech CreditAttribution: sivaramapandianbtech commentedI am also having this problem .I dont know how to rectify this.can you please anyone give me a solution.How to set permanent flag for uploaded files.This is not only for webform .Even for my custom modules also this problem occur.
Comment #7
quicksketchsivaramapandianbtech, please do not ask a general question in the Webform issue queue. If it's not a bug in webform, it shouldn't be asked here. Use the http://api.lullabot.com/file_set_status function to set a file to permanent so it's not deleted on cron jobs.
Comment #8
sivaramapandianbtech CreditAttribution: sivaramapandianbtech commentedok sorry...but what is the title for this issue"Uploaded files deleted on cronjob". I think this title is relevant to my question. That is why i asked here.