Hello,

I can't see any option to import multiple files while adding media for any gallery after creating. Is there any other thing required for this?
If I am trying to drag multiple files it's just taking only one as there is one browse button only.

Thanks,
RajeevK

Comments

Moloc’s picture

Category: bug » support

With the default media module you can only upload one file at once.
You can use the Plupload Integration Module to upload more than one file at once.

Do you have this module installed and activated?

rajeevk’s picture

I tried with this module, and I put the js file too...but not working.
The design of upload UI is getting changed and I am hardly able to see anything related to upload there
I couldn't find the reason..

Is there anything more is required apart from module & js file ?

Thanks,
RajeevK

Moloc’s picture

Goto /admin/reports/status
Is there an error reported? Have a look for plupload information on that site. I assume, that you have an old version of plupload.

rajeevk’s picture

Hello Again,

Again I uploaded the plupload from this link - http://drupal.org/project/plupload

and then enabled that and tried to add media but...same screen appeared for me...and there is no error report..

Thanks,
RajeevK

rajeevk’s picture

Some error is listed on status page, which looks like-
"Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC."

I tried putting PECL uploadprogress in library but it's not getting removed after doing that so...

Can you suggest me any way to achieve this ?

Thanks,
RajeevK

Moloc’s picture

From the README.txt

1 This module integrates the Plupload library (available from http://plupload.com)
2 with Drupal forms. To install the Plupload library:
3
4 1. Download it (version 1.5.1.1 or later) from http://plupload.com.
5 2. Unzip it into sites/all/libraries, so that there's a
6 sites/all/libraries/plupload/js/plupload.full.js file, in addition to the
7 other files included in the library.

Is the library (not module!) also installed?

rajeevk’s picture

Status: Active » Closed (fixed)

Hello Moloc,

Very very thanks for your response. I have solved my problem by installing these libraries. It's working good now except it's not taking big files...but even after I add multiple files It's not showing in the gallery...why ?

Really some time taking thing...all files are getting uploaded 100% and then it's forwarding me to gallery page but there is no image file in sight...

Real thanks,
RajeevK

rajeevk’s picture

Status: Closed (fixed) » Active

Not solved yet...

rajeevk’s picture

While trying to upload multiple files..it's showing 100% done & forwarding me to gallery page but there are no image.
I checked recent log and found two error log -

1. Warning: Invalid argument supplied for foreach() in media_gallery_add_images() (line 265 of /var/www/html/rajeev/drupal7/sites/all/modules/media_gallery/media_gallery.pages.inc).

2. Notice: Undefined index: und in media_gallery_add_images() (line 264 of /var/www/html/rajeev/drupal7/sites/all/modules/media_gallery/media_gallery.pages.inc).

Here is the codes which is there at those lines number -
$items = $node->media_gallery_media[LANGUAGE_NONE];
foreach ($items as $item) {
$existing_fids[$item['fid']] = TRUE;
}

Does it require any change ?

I think I am near to solve my problem....please help me...
Thanks,
RajeevK

Moloc’s picture

This is a known issue, but it should not have any effect on uploading (to fix it, see #1469396: Notice & Warning on first media upload).

Can you find the images in the public file folder? (Or are you using a private folder?)
Can you find the images in Administer -> Content -> Media ?

rajeevk’s picture

Yes I can find that in media library.

But I have to map the imported image to gallery anyhow..otherwise user will get confuse about their uploaded image..I hope you can understand the problem.

I am using public library and it's showing there..even I can go to add media again and find them in library to add them. but at the first time when I am doing batch upload the lightbox layout is getting close automatically..

Is there any solution for it ? (Ignore if your given link solve this).

Thanks,
RajeevK

rajeevk’s picture

I applied that patch of yours and cleared the cache...tried to upload but..same things happens...

Couldn't solve....

I have taken much time of your...so sorry and many thanks....

If you can give me some other solution for it then it would be great...

Thanks,
RajeevK

Moloc’s picture

You open a gallery and click on the add media link. A lightbox-popup opens (not a new tab) with the upload window, where you can select the files. After all files are uploaded, the media files stored in the public file system, added to the database and linked with media_gallery. Then the upload-popup closes and reloads the page. Thats the way, media_gallery works.
As you get the notice and warning in #9, the code seems to be executed (some lines later the node with the new files get saved).

So you say, all these steps are ok, except that the files are not linked with the gallery (gallery is still empty)?

Can you try to add the media with the Library-Tab? Does that work?

rajeevk’s picture

Yes, everything is working which you have said in steps.

Multiple upload is putting files in to pubic folder and returning me to blank gallery page. Though I can add media files later by clicking on to add media again and selecting images from library tab.

I have to add media directly from multiple upload otherwise it would be so problematic for non-tech persons..I hope you are getting my point.

Thanks for understanding :)

abalhassans’s picture

I encounter what i believe to be the same issue. Upload works fine for few images (<50 [5-6Mb files]). However, if i upload too many at once (~160) the upload completes fine and all the images are present in the library tab, but they are not linked to the gallery.

Whenever the upload completes the screen goes to the gallery but the whole page is greyed and gets stuck there. in a normal upload (few images) the page gets greyed and then proceeds to the gallery where images are succesfully linked.

Moloc’s picture

Rajeevkr: Can you confirm, that the issue described in #15 is the same, as you have? So it works with a small amount of images, but not with a lot of images? How many images do you try to upload and what size do they have?

abalhassans: I can confirm that issue. The problem is, that you receive a php-timeout. The result causes a javascript error and the page will not reload / add the images to media_gallery. (Note: You should check, whether really all images are in the media-directory.)

rajeevk’s picture

Hello Malloc,

How are you ?

No I am not facing this issue with my setup. I never checked it before as it was not my need. But when you asked me now I went there and checked. My set up can handle 100-120 files at a time with average of 2-3 MB, so I don't think I have any problem like he is explaining.

Can I get in touch with you in gtalk or something ? I need some help to get a way to contribute my code to Drupal.org. I am not able to find any solution of it.

Thanks,
RajeevK

abalhassans’s picture

Moloc,

Thanks for taking a look. I check and all files were uploaded.

Thanks.

Moloc’s picture

Do you have clean urls enabled or disabled?
Your issue sound like #1000702: Ajax Callbacks fail if Clean URLs are not enabled, which is already fixed in beta7.

lsolesen’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.