[#10150] Image type in Horde_Form shouldn't use tmp storage
Summary Image type in Horde_Form shouldn't use tmp storage
Queue Horde Framework Packages
Queue Version Git master
Type Enhancement
State Accepted
Priority 1. Low
Requester mrubinsk (at) horde (dot) org
Created 2011-05-27 (3797 days ago)
Updated 2016-01-18 (2100 days ago)
Patch No

2016-01-18 09:35:30 Jan Schneider State ⇒ Accepted
Milestone ⇒
2011-05-27 14:23:38 Michael Rubinsky Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Image type in Horde_Form shouldn't use tmp storage
Queue ⇒ Horde Framework Packages
Milestone ⇒ 5
Patch ⇒ No
Reply to this comment
Adding so this doesn't get lost. The image variable type currently 
uses the system's temporary file storage to store the image file that 
is to be displayed in the image form field. This is broken because it 
requires that the file NOT be removed after request shutdown since 
fetching the image via an img tag is a separate request. This causes 
files to build up in the tmp directory.

Instead, we should at least provide the option to use the VFS system 
if it's available with possible fallback to a tmp directory.

Below is some email correspondence for the record:

Quoting "Michael J. Rubinsky" <mrubinsk@horde.org>:

[Hide Quoted Text]
commit 3a6dae7dab4c44fce7e283bd0c0ed4489808851a
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Mon May 23 18:05:00 2011 -0400

     Bug: 10050 Don't remove tmp image file at request shutdown.

     Commit 9fd6579fa7b1e1a920601c3f9517c1fd18a84c0e broke the existing
     behavior of not removing the temporary file. This restores that
     functionality. Not sure if this is the final fix for this, as this
     causes tmp image files to build up in the temporary directory. However,
     this was the previous behavior and should be the admin's job to perform
     gc on temp directory periodically anyway.

turba/lib/Object.php |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
If data *must* persist beyond a single access, we should never be 
using temp files.  We must use some sort of permanent storage solution 
instead (e.g. VFS; see., e.g., compose attachment data in IMP).   
Anything else is attempting to use temp files in a manner not intended 
in the original design.

Saved Queries