how to upload photos for a module in drupal. can any one help for it

Comments

lancsDavid’s picture

to include a file upload field in a node/page, the FormAPI has an element type called 'file'

 <?php
$form['new']['upload'] = array(
  '#type' => 'file',
  '#title' => t('Attach new file'),
  '#size' => 40,
);
?> 

i don't know if this will help you though, because you don't explain your scenario. i mean, do you want image nodes & image galleries, inline images, images as file attachments, or what?

ashwinkumar01’s picture

hi,

thanks for the reply.

I want the image to be displayed in my module which has text in it. example

consider about us which must contain text and photos