* Fix for bug [#1578], making the Imgur filename configurable and having the current time in the default pattern fixes the information leak.

This commit is contained in:
RKrom 2013-12-16 16:24:39 +01:00
commit 85e8a59447
2 changed files with 4 additions and 2 deletions

View file

@ -51,7 +51,9 @@ namespace GreenshotImgurPlugin {
public bool AddTitle;
[IniProperty("AddFilename", Description = "Is the filename passed on to Imgur", DefaultValue = "True")]
public bool AddFilename;
[IniProperty("FilenamePattern", Description = "Filename for the Imgur upload", DefaultValue = "${capturetime:d\"yyyyMMdd-HHmm\"}")]
public string FilenamePattern;
[IniProperty("ImgurUploadHistory", Description="Imgur upload history (ImgurUploadHistory.hash=deleteHash)")]
public Dictionary<string, string> ImgurUploadHistory;

View file

@ -172,7 +172,7 @@ namespace GreenshotImgurPlugin {
public bool Upload(ICaptureDetails captureDetails, ISurface surfaceToUpload, out string uploadURL) {
SurfaceOutputSettings outputSettings = new SurfaceOutputSettings(config.UploadFormat, config.UploadJpegQuality, config.UploadReduceColors);
try {
string filename = Path.GetFileName(FilenameHelper.GetFilename(config.UploadFormat, captureDetails));
string filename = Path.GetFileName(FilenameHelper.GetFilenameFromPattern(config.FilenamePattern, config.UploadFormat, captureDetails));
ImgurInfo imgurInfo = null;
// Run upload in the background