Delete old files automatically when a new image is uploaded.

dopry - September 5, 2006 - 23:22
Project:Banner
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:dopry
Status:closed
Description

The attached patch will mark all old attachments for deletion on the banner node form. only the newest attachment not marked for deletion will be saved on submit.

AttachmentSize
banner-delete-old-files.patch.txt1.39 KB

#1

dopry - September 5, 2006 - 23:24
Version:4.6.x-1.x-dev» HEAD

cough, cvs/4.7, cough

#2

wulff - September 15, 2006 - 08:58
Status:patch (code needs review)» fixed

Changed behavior makes sense to me. Applied to HEAD. Thanks!

#3

wulff - September 15, 2006 - 14:54
Status:fixed» patch (code needs work)

*gah* more testing needed, it seems. AFAICT from continued testing, the attachment form elements are not available at the time this code is run.

#4

dopry - September 27, 2006 - 17:34

I'll follow up with it tonight.. They should be stored in the form array. I made upload use the form array to pass all the file data around so that would be available for other modules. Maybe there is a bad key involved.

#5

dopry - May 20, 2008 - 14:49
Status:patch (code needs work)» closed

closing sing module is abandoned.

 
 

Drupal is a registered trademark of Dries Buytaert.