Bulk File Upload Module provides user interface to upload multiple files with a zip format & extracts it to any folder within public folder

Project Page: Bulk file Upload
Git Repository:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/mehul.shah/2001972.git bulk_file_upload

pareview.sh review:https://pareview.sh/node/1148

Manual reviews of other projects

Comments

mehul.shah created an issue. See original summary.

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

jimmyko’s picture

I personally think that this name will make others confused with Bulk Media Upload

Also, I recommend you rewrite line 99-113 in bulk_file_upload.admin.inc with ArchiveZip class provided by Drupal core.

    $zip = new ZipArchive();
    $zip = zip_open(drupal_realpath($file->uri));
    $count = 0;
    $invalid_files = '';
    if (is_resource($zip)) {
      while ($zip_entry = zip_read($zip)) {
        $file_name = zip_entry_name($zip_entry);
        $extension = explode(".", $file_name);
        $extension = end($extension);
        if (!in_array($extension, $setting_extension)) {
          $count++;
          $invalid_files[] = $count . ')' . $file_name;
        }
      }
      $zip = zip_close($zip);
fishfree’s picture

I also don't know the difference between this module and the Pack & Upload module. It seems this module can not meet the requirement of "No duplication".

fishfree’s picture

Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Needs review

While duplication is bad and we should let applicants know it is not an application blocker.

tajinder.minhas’s picture

StatusFileSize
new47.33 KB
new37.13 KB

bull-upload warning
Validation warning
Hello mehul.shah,

Following are the points which i could find while reviewing your module

  1. There is a warning on line 37 of bulk_file_upload.admin.inc you can put one check isset($form_state['values']) to avoid this warning
  2. This permission "bulk_file_upload" on line 26 in bulk_file_upload.module is not being used anywhere.
  3. Line 100 is throwing warning when you select folder for upload
  4. On line 144 in submit handler you have hardcoded "You can check uploaded file using @path_check + image name" but i uploaded pdf file so it was bit confusing either you can use file instead of image name or any meaningful sentence
tajinder.minhas’s picture

Status: Needs review » Needs work
Rahul Seth’s picture

@Mehul,

I observed few points while reviewing:

  1. Line no. 81 in admin file, it would be better if you use check_plain function. otherwise it'll create security threat.
  2. Mention module requirement in README file.
PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

mehul.shah’s picture

Status: Closed (won't fix) » Needs review

Hi,

Thanks for reviewing the project.

@jimmyko -

  • The Project name is well suiting the requirements of this module
  • There are some validation on file extension which can not be handled by the ArchiveZip class provided by Drupal core and hence it is not used

@fishfree - This module is a bit different, wherein the user can select the folder in which he wants to upload the file in addition to that user also can create a new folder in public directory. Apart from this, he can filter out certain extensions of the file under the zip folder while extracting. For example - if zip contains .png and .jpg both but the user wants to extract only .jpg then he can put a filter of .jpg in Allowed File Extension to filter this extension out.

@tajinder.minhas - First of all, thanks for extensive testing.

  • There is a warning on line 37 of bulk_file_upload.admin.inc you can put one check isset($form_state['values']) to avoid this warning - Fixed
  • This permission "bulk_file_upload" on line 26 in bulk_file_upload.module is not being used anywhere - This permission is used under hook_menu
  • Line 100 is throwing warning when you select folder for upload - Fixed
  • On line 144 in submit handler you have hardcoded "You can check uploaded file using @path_check + image name" but i uploaded pdf file so it was bit confusing either you can use file instead of image name or any meaningful sentence - Updated

Along with this comment, I am changing the status of the module to "Needs Review"

sjpagan’s picture

Title: Bulk File Upload [D7] » [D7] Bulk File Upload
sjpagan’s picture

Issue summary: View changes
sjpagan’s picture

Issue summary: View changes
sjpagan’s picture

Status: Needs review » Needs work

Hi @mehul.shah,
you have a git errors:

The following git branches do not match the release branch pattern, you should remove/rename them. See https://www.drupal.org/node/1015226

remotes/origin/7.x-1.1

https://pareview.sh/node/1148

klausi’s picture

Status: Needs work » Needs review

@sjpagan: the git branch name alone is surely not an application blocker. Anything else that you found or should this be RTBC instead?

sjpagan’s picture

StatusFileSize
new140.86 KB

Hi, @klausi,
sorry I promise to be more careful :-) ...

I found little problem on your code, at line 90 in file bulk_file_upload.admin.inc, @mehul.shah may include if foldere exist. See image

sjpagan’s picture

Status: Needs review » Needs work
mehul.shah’s picture

Status: Needs work » Needs review

Hi sjpagan & klausi,

Thanks for reviewing the project.

  • I have Fixed the git errors
  • I found little problem on your code, at line 90 in file bulk_file_upload.admin.inc, @mehul.shah may include if foldere exist - Fixed

Along with this comment, I am changing the status of the module to "Needs Review"

sumit.prajapati’s picture

Hi mehul,

Add type of menu in hook_menu.
Add hook_help in module file.

mehul.shah’s picture

Hi Sumit Prajapati,

I don't know if its mandatory to add hook_help. Even the type of menu in hook_menu is not mandatory as If the "type" element is omitted, MENU_NORMAL_ITEM is assumed.

Anyways I have added both to the module file.

Along with this comment, the status of the module remains "Needs Review"

jeetendrakumar’s picture

@mehul.shah

1. When I am tying to upload wrong file its show me following warning and notice.

    The specified file Rajesh Uppadhay.mp4 could not be uploaded. Only files with the following extensions are allowed: zip.
    Notice: Trying to get property of non-object in bulk_file_upload_form_validate() (line 107 of /var/www/html/drupal7-1/sites/all/modules/bulk_file_upload/bulk_file_upload.admin.inc).
    Warning: zip_open(): Empty string as source in bulk_file_upload_form_validate() (line 107 of /var/www/html/drupal7-1/sites/all/modules/bulk_file_upload/bulk_file_upload.admin.inc).
mehul.shah’s picture

Hi @jeetendrakumar,

I have fixed the above-mentioned issue.

Along with this comment, the status of the module remains "Needs Review".

manav’s picture

Status: Needs review » Needs work

Hi @mehul.shah

I have reviewed your project and found some issues as:

  • 1. On pareview.sh, showing an error in it.
    FILE: /root/repos/pareviewsh/pareview_temp/bulk_file_upload.module
    --------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------
    14 | ERROR | [x] Case breaking statements must be followed by a single
    | | blank line
    --------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------
  • 2. On project page only single line description is mention even the above description is not so clear. Description should be more specific and clear with Requirements, Project Page link, pareview.sh review link, steps and configuration etc. Please follow this link for help: https://www.drupal.org/node/2839511
mehul.shah’s picture

Issue summary: View changes

Thanks! Manav,

I have fixed the above-mentioned issue.

I have updated the description of the issue and there are no configuration steps as such.

mehul.shah’s picture

Status: Needs work » Needs review
mehul.shah’s picture

Issue summary: View changes
mehul.shah’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
mehul.shah’s picture

Please review it.

johnnybgoode’s picture

Individual Account
Yes
No duplication
No, see https://www.drupal.org/project/pack_upload
Master Branch
Yes
Licensing
Yes
3rd party assets/code
Yes
README.txt/README.md
Yes
Code long/complex enough for review
Yes
Secure code
Yes
Coding style & Drupal API usage
No
  1. + Public filesystem should not be assumed to be `sites/default/files`, the `public://` stream wrapper should be used instead.
  2. Hook menu callback should be `drupal_get_form()` for the admin page, instead of using an intermediate `page callback`
mehul.shah’s picture

Thanks! Johnybgoode,

I have done above-mentioned changes.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgsandboxmehulshah2001972git

I'm a robot and this is an automated message from Project Applications Scraper.

mehul.shah’s picture

Status: Needs work » Needs review

The issues have been fixed.

With this comment, i am changing the application status to "Needs Review".

mehul.shah’s picture

Please review it.

keshavv’s picture

StatusFileSize
new57.64 KB

Mostly fine, But fix One Bug . See attachment
fix this

mehul.shah’s picture

Priority: Normal » Critical

Thanks! Keshav.

I have fixed the issue.

jesss’s picture

Status: Needs review » Needs work

1. Is this a duplication of the existing Bulk File Upload module? The application links to a sandbox and the code appears to be quite different. At the very least, there appears to be a namespace conflict.

2. Is there a reason you've set the menu item as a MENU_CALLBACK instead of a MENU_NORMAL_ITEM? As it stands, after enabling the module, the configuration link does not appear on the Config page, and there is no link under the Media subsection, which is very confusing.

3. There is a typo in bulk_file_upload.admin.inc on line 41.
'#description' => t('Use comma to separate multiple extensstion<br/> Ex. jpg,jpeg'),
should be
'#description' => t('Use commas to separate multiple extensions<br/> Ex. jpg,jpeg'),

4. I was unable to get this module to work. When attempting to upload my zip file, I got the following fatal error:

Error: [] operator not supported for strings in bulk_file_upload_form_validate() (line 107 of /.../sites/all/modules/bulk_file_upload/bulk_file_upload.admin.inc).

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.