Newbie question and first post to the local group!
For reasons I can't quite understand, I'm trying to teach myself a little Drupal module development. Apparently just setting things up and keeping them running isn't enough. Anyhow, I've built a little module that takes bits of information, artist name, title of work, etc, and lets you select a cover file. The whole thing gets passed to an external script which is already working (Linux command line I can deal with).
What I want to do, which I can't wrap my head around, is a way to extract just the image_file name from what gets selected.
$form['image_file'] = array( '#type' => 'media', '#title' => t('Select Artwork:'), '#description' => t('
The media selector will let you choose from a selection of cover art available on this system. Just click the Select media button below and find something you like.'), );
The image itself gets stored in
and for the sake of my script, I want just the "blue_cover" part of that returned to a variable in my subroutine.
That's where I'm stuck. How do I return the file name, all by its lonesome? I've tried several variations but nothing works out quite right.
Note: This massagee wos nat speel or gramer-checkered.