﻿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
11228	FieldFile with check if file exists, and don't raise errors by default	Hersonls	nobody	"Many people ask and also has the need to verify that the file is sent to the server is really in its place.

This need arises because they are made unnecessary requests for lack of the file in media server and also for reasons of aesthetics, because the lack of image files or result in a different box with alt attribute, or result in a 404 not found.

The class FieldFile not give the developer the possibility to check if file exists and that is the developers create a method in a class model which will check if file exists on the media server or not.

I created a patch where it created a method for class FieldFile call is_exists which checks if the file exists. This method is valid for all inheritance of FieldFile class.

For example,

{{{
{% if object.file.is_exists %}<a href=""{{ MEDIA_URL }}{{ object.file }}"">download this file</a>{% endif %}
{% if object.image.is_exists %}<img src=""{{ MEDIA_URL }}{{ object.image }}"" alt=""My image"" />{% endif %}
}}}

"	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	wontfix		Simon Litchfield	Design decision needed	1	1	1	1	0	0
