Closed bradfordcondon closed 6 years ago
I do not know what that comment is about... Organism image upload happens by the admin in https://i5k.nal.usda.gov/node/add/chado-organism, and they are stored in sites/default/files
thanks very interesting. Many of the forms pass around a "image upload" parameter but theres nothing in the form that would allow a user to upload an image, so I was getting a little confused.
If image upload is controlled by the admin then we can get rid of all that, and maybe create a future issue to allow user-uploaded images.
For example in the dataset submission form:
$form['assembly']['project']['organism_image_filename'] = [
'#type' => 'textfield',
'#title' => t('Image file name for your organism page ') . '<a href="' . $base_url . '/image_permission/new" target="_blank" >' . t('(image submission form)') . '</a>',
// '#description' => t("Provide the image url"),
];
looks like that url is for a "filldpdf-form' node, modified in the custom_i5k module.
/**
* Implements hook_menu_alter
*/
function custom_i5k_menu_alter(&$items) {
$items['image_permission/new'] = $items['node/add/fillpdf-form'];
unset($items['node/add/fillpdf-form']);
}
Ah. I think we used to have a field for an image URL in a previous iteration of the form. So it's probably a relic. I think it should be safe to remove.
Clearly the organism image upload is happening somewhere, but where/how?
The readme says