tclaffy, to add back in the ability to "Keep Source" requires a couple code changes and recompile of the Gallery Module:
The code that deletes the "source" image after upload, after resizing and generating Thumbnail
is already in place from a prior version of the Gallery known as TTTGallery.
The code that downloads the _source version if it exists or the resized version is also in place and working.
FILE: \DesktopModules\Gallery\Components\Configuration\Config.vb:
Line 161 - Change default behavior from "Keep Source" to "Not Keep Source"
' Private mKeepSource As Boolean = True
Private mKeepSource As Boolean = False
Line 912 - Restore the "Keep Source" setting from the ModuleSettings, default if not available.
'<JJK. allow KeepSource to be "restored" as a setting. must manually insert into ModuleSettings table.
mKeepSource = CBool(GetValue(settings("IsKeepSource"), CStr(mKeepSource)))
FILE: \DesktopModules\Gallery\Components\Configuration\Config.vb:
Line 89 - save "Keep Source" setting during initial module configuration.
' <JJK. add KeepSource back in as a saved setting.
ctlModule.UpdateModuleSetting(ModuleId, "IsKeepSource", "False")
For Existing Modules that were placed before the code changes or where want to
change the setting, you must MANUALLY update the database for ModuleSettings.
Using SQL Query Analyzer or other direct SQL tool:
select * from ModuleSettings order by moduleid desc -- to find most recently added modules
insert into ModuleSettings (ModuleId, SettingName, SettingValue) values (-YourGalleryModuleID-, 'IsKeepSource', 'False')
or
update ModuleSettings
set SettingValue = 'False' -- or 'True' to keep the source image.
where
ModuleId = -YourGalleryModuleID-
and SettingName = 'IsKeepSource'
TODO:
I did not add the option to the Settings.ascx to change the option in the configuration screen.
That would require a checkbox object, localization tags, editing the tab order and such. Plus code
to save the setting such as (about line 400) in Settings.ascx.vb:
ctlModule.UpdateModuleSetting(ModuleId, "IsKeepSource", chkKeepSource.Checked.ToString)
I didn't do that since I don't need to change it for my purposes