This patch (against 5.x-1.x-dev (2007-Aug-10)) will make Mugshot work with the download method set to private. Works perfectly at my site. Good starting point for a patch which makes Mugshot work with either method...

Comments

bonvga’s picture

Assigned: Unassigned » bonvga
Status: Needs work » Fixed

Thanks for this great patch !

I've applied it and added support for the two download methods. See below :

function mugshot_storepath_to_viewpath($storepath) {
	switch(variable_get('file_downloads',FILE_DOWNLOADS_PUBLIC)) {
		case FILE_DOWNLOADS_PUBLIC:
			$path = $storepath;
		break;
		default:
		case FILE_DOWNLOADS_PRIVATE:
			$path = url('/mugshot/view/'.basename($storepath));
		break;
	}
	return $path;
}

If you use the private download method be sure you have a .htaccess file in files/mugshot contain this line :

deny from all

Cordially,

Arnaud.

Anonymous’s picture

Status: Fixed » Closed (fixed)
ThriLLz’s picture

does not work.... just with public download...