Esempio n. 1
0
        public IHttpActionResult DeleteFile(int id)
        {
            string path = MakePath(id);

            if (path != null)
            {
                File.Delete(path);
            }
            bool isRemoved = _imageFileService.DeleteImageFileById(id);

            if (isRemoved)
            {
                return(Ok());
            }
            return(new HttpActionResult(HttpStatusCode.NoContent));
        }