Drupal 7, using:

  • Statuses
  • Micropublisher (FBSMG)

I am having a problem with this module, so that when you attach an image for upload and click "share" you get an error message saying that "The photo could not be uploaded." / "No File Selected". Note, this only occurs/fails the first time. When you try it again, it always succeeds.

Any ideas on this, as I am at a loss?

Tried:

  • Fresh Install w/ just this Module
  • Tried using a few different branches

Could this be a problem with the file system or something? Tested against this too, but can't find errors uploading files into a content type.

EDIT: By happen-stance, I had my browser Console open and it has a warning (not an error) "Form contains a file input, but is missing method=POST and enctype=multipart/form-data on the form.  The file will not be sent."

Comments

dalegrebey’s picture

This probably needs to be patched properly.

/**
 * Implements hook_form_FORM_ID_alter().
 */
function fbsmp_form_statuses_box_alter(&$form, &$form_state) {

  // All the various module code
  // I defined the form encoding type to fix this using this code
  $form['#attributes'] = array('enctype' => 'multipart/form-data');