drupal 모듈의 파일로 작업하고 있습니다. 파일이 업로드되면 나는 파일이 제대로 추가업로드 된 파일 삭제 drupal7
$form['Background_image'] = array(
'#type' => 'managed_file',
'#title' => t('Image'),
'#progress_message' => t('Please wait...'),
'#progress_indicator' => 'bar',
'#description' => t('Click "Browse..." to select an image to upload.'),
'#required' => TRUE,
'#upload_validators' => array('file_validate_extensions' => array('jpeg jpg png gif')),
'#upload_location' => 'public://backgroundimage/',
'#default_value' => $this->options['Background_image'],
);
이 양식을 추가 된 제거 버튼 파일을 제거하고 새 여주 문제가이 버튼을 내가 들여다 그렇게 작동하지 않는 것입니다 업로드 allwoing 나타납니다 파일 모듈과 나는 파일을 제거하는 훅이 아직 구현되지 않았다는 것을 발견했다.
function file_file_delete($file) {
// TODO: Remove references to a file that is in-use.
}
어떻게 uploade 파일을 제거 할 수 있습니까?
:-) 업데이트 후 작업을 시작합니다, 당신은 여기에 모듈 버전을 게시 할 경우 더 당신을 도울 수있을 것입니다 사실 그것은 삭제 기능이 "파일"에 대해 작동하지 않는 것이지만 "managed_file"에 대한 제거 버튼이 구현되어 있지만 나는 그것이 작동하지 않는 이유를 모른다. –