1

I found a great solution to upload images automatically, but I need help understanding where the code goes and how I figure out what the "my_element" value should be.

This is a follow-up question to an existing question but I do not have permission to comment on existing questions :/ How can I make Plupload in D7 start uploading automatically?

The code: $form['my_element'] = array( '#type' => 'plupload', '#title' => t('Upload files'), '#description' => t('This multi-upload widget uses Plupload library.'), '#autoupload' => TRUE, );

Do I put this within the plupload.module or filefield_sources_plupload.module? The machine name of my image field is field_image, so is that what I use in place of "my_element"?

  • You need to write your own module for that (don't hack the contrib modules). If you provide some more details about what you're trying to accomplish we may be able to help you further – Clive Sep 12 '14 at 16:51
  • Thanks, I have a simple node/add/article with an image field called field_image, and using the plupload widget. Currently users have to click "start upload" after choose a file using "Add file". I simply want to use the code provided to have the files upload automatically as soon as the user chooses a file. – Haz Sep 12 '14 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.