﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9396	FILE_UPLOAD_TEMP_DIR ignored on Windows?	spkane	nobody	"When running Django 1.0 on Windows XP, I am getting an error when uploaded a headshot (image), while adding an author from the Chapter 6 tutorial in the Django Apress book. The error is related to ""SuspiciousActivity"", however my FILE_UPLOAD_TEMP_DIR directory is set to 'c:\djcode\mysite\temp' which should be safe. The issue, based on the error message, however seems to be that it is actually trying to save the image into /tmp, which of course causes a problem on Windows. I was able to get this working for myself by patching django\db\models\fields\files.py.

I am a pretty new Python programmer and I realize that this patch is a hack, since I am forcing something to happen here and possibly over ridding a legitimate value. I tried to change the initial init from upload_to='' to upload_to=settings.FILE_UPLOAD_TEMP_DIR. However that didn't work, so it seems that the class is getting initialized with a value, but it is the wrong value, and I could not trace the code back any further. This patch works for me, but it would be nice to have a proper solution in the future."		closed	Database layer (models, ORM)	1.0		invalid	FILE_UPLOAD_TEMP_DIR, SuspiciousActivity, Windows		Unreviewed	1	0	0	0	0	0
