Project page: https://www.drupal.org/sandbox/arshadkhan35/2820351

Description

This module creates a Bulk Image Uploader form that enables you to upload bulk images in a zip file at a specified location inside files directory,It also compress all the image with jpeg Quality factor that provided by user in uploader form. This is great for uploading bulk images with ".jpg" extension and compressing its size.

While this module allows you to directly upload bulk images in a zip file, it is highly advisable to use all images with ".jpg"
extension if you want to compress it size.

Instructions

After you enable this module:

  1. got to Structure ,navigate to Upload Images and click.
  2. Add path where you want to upload the zip,This should be a folder inside files directory .
  3. Add jpeg quality factor ranging from 0 to 100.
  4. choose zip file containing all images.
  5. submit,file will be uploaded.

Git clone:
git clone --branch 8.x-1.x https://git.drupal.org/sandbox/arshadkhan35/2820351.git

My Reviewed projects:

  1. https://www.drupal.org/node/2904450#comment-12237382
  2. https://www.drupal.org/node/2907210#comment-12251495
  3. https://www.drupal.org/node/2763403#comment-12251648
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arshadkhan35 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.

arshadkhan35’s picture

Issue summary: View changes
PA robot’s picture

Issue summary: View changes

Fixed the git clone URL in the issue summary for non-maintainer users.

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

arshadkhan35’s picture

Issue summary: View changes
arshadkhan35’s picture

Issue summary: View changes
arshadkhan35’s picture

Issue summary: View changes
deepanker_bhalla’s picture

FileSize
529 bytes

Hi,

I have tested your module and found out that while the .zip file is uploaded and the form is submitted. The directory is created but the success message coming on the front is "image is not jpg hence not uploaded."

The images are JPG only but after running it is saying that it's not which is also not uploaded. Whereas I can see the folder under my directory.

Suggestion: If the same name zip file is uploaded again then there must be an option to confirm whether to replace or not?

jeetendrakumar’s picture

Status: Active » Needs work

@arshadkhan35

1. pareview.sh gives some errors.

https://pareview.sh/node/1183

2. image_upload.module is empty. you can remove it.

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.

arshadkhan35’s picture

Status: Closed (won't fix) » Needs review
ashishdalvi’s picture

Status: Needs review » Needs work

Hi Arshad Khan,

Automated Review

Minor suggestion from automation review :

  • Git default branch is not set, see the documentation on setting a default branch.([#1659588])

Manual Review

Individual user account
[Yes: Follows ]
No duplication
No
Master Branch
No
Licensing
Yes
3rd party assets/code
Yes Follows.
README.txt/README.md
Not as per the drupal.org guidelines. Please refer the guidelines https://www.drupal.org/node/2181737.
Code long/complex enough for review
Yes
Secure code
Yes
Coding style & Drupal API usage
  1. Module package name is 'custom'. It should be so generic, it should be relavent to module functionality
  2. submitForm method in UploadInterface class have duplicate docblock.
  3. Helper method compressImage can be created a services. Please refer https://www.drupal.org/docs/8/api/services-and-dependency-injection/serv...

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

This review uses the Project Application Review Template.

ashishdalvi’s picture

Hi Arshad,

Collect your review bouns to fast forward module review process.

More information : https://www.drupal.org/node/1975228

Thanks

arshadkhan35’s picture

Thanks Ashish.Dalvi,
All the suggestion mentioned in #12 has been implement and pushed to repo.

arshadkhan35’s picture

Status: Needs work » Needs review
ashishdalvi’s picture

Please refer comment #13 for collecting your review bouns.

arshadkhan35’s picture

Issue tags: +PAreview: review bonus
arshadkhan35’s picture

Issue summary: View changes
shashikant_chauhan’s picture

Status: Needs review » Needs work
FileSize
77.44 KB
127.87 KB

Hello Arshad,
Kindly fix the below issue.

Manual Review

Individual user account
[Yes: Follows ]
No duplication
No
Master Branch
[Yes: Follows]
Licensing
[Yes: Follows]
3rd party assets/code
[Yes: Follows]
README.txt/README.md
[Yes: Follows].
Code long/complex enough for review
[Yes: Follows]
Secure code
[No]
Coding style & Drupal API usage
1. In file bulk_image_upload_and_compressor/src/CompressImages.php
a) Correct the Spelling for word service
/**
 * Contains sercvice for compressing, jpg image size.
 */

b) Replace deperecated function drupal_unlink.
https://api.drupal.org/api/drupal/core%21includes%21file.inc/function/dr...
c) drupal_set_message is not used as correctly. Use placeholder, don't use direct code in function.
https://api.drupal.org/api/drupal/core%21includes%21file.inc/function/dr...

      drupal_unlink($source_url);
      $exploded_img = explode('/', $source_url);
      drupal_set_message($exploded_img[count($exploded_img) - 1] . $this->t('Image is not jpg hence not uploaded.'), 'status');

2. In file bulk_image_upload_and_compressor/image_upload.routing.yml, you have created 2 routs. I checked the code in those files they are showing the same form. Whats the use creating 2 routs for the same form??

3. Getting access denied for URL http://localhost-drupal8/img_content

4. There is no validation is set in the form. see the attached files.

5. In file bulk_image_upload_and_compressor/src/Form/UploadInterface.php
a. replace the deprecated mkdir with
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!File!FileSystem.p...
b. replace the deprecated drupal_realpath with https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21File%21Fi...
c. replace the deprecated drupal_unlink with https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21File%21Fi...

This review uses the Project Application Review Template.

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.

arshadkhan35’s picture

Assigned: Unassigned » arshadkhan35
apaderno’s picture

Assigned: ARUN AK » Unassigned