When I upload an image in file attachments and list that image then the file is moving from default files folder(sites/default/files) to (sites/default/files/images) folder.

I have used the url of image(sites/default/files/[image-name]) in some of the nodes of my site but when I list the images later then that images path is moving from sites/default/files/[image-name] to sites/default/files/images/[image-name] which results the image is not displaying in the node.

So we should have an option in the module sothat We can Move or Copy the image from files to files/images folder.

Comments

Jalandhar’s picture

Status: Needs work » Patch (to be ported)
StatusFileSize
new860 bytes
new787 bytes

Hi,

I have created the patch for image module when the upload image module is enabled. Please see the attachment of patches which will copy or move the images as per the settings in /admin/settings/image.

If "Keep Original Image." is selected then the image will be copied from files folder to files/images folder and if it is not selected then it will be moved from files folder to files/images folder.

Jalandhar’s picture

StatusFileSize
new891 bytes
new818 bytes

Updated the patch with the path of the module file

Jalandhar’s picture

Status: Patch (to be ported) » Needs review
Jalandhar’s picture

Updated the patch files with correct naming.

Jalandhar’s picture

Project: Upload Image » Image
Version: 6.x-1.0 » 6.x-1.1
Component: Code » image.module
Priority: Major » Minor

Status: Needs review » Needs work

The last submitted patch, image-admin_inc_file-1699572-4.patch, failed testing.

Jalandhar’s picture

Version: 6.x-1.1 » 6.x-1.2
Status: Needs work » Needs review
StatusFileSize
new999 bytes
new906 bytes

Another try at the patch.

Updated the patch files.

Status: Needs review » Needs work

The last submitted patch, image_admin_inc_file-1699572-7.patch, failed testing.

Jalandhar’s picture

StatusFileSize
new996 bytes
new911 bytes

Another try at the patch

Jalandhar’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, image_admin_inc-1699572-9.patch, failed testing.

joachim’s picture

From what I gather, upload_image is not terribly compatible with this module.

Secondly, could you upload your changes as a single patch please?

Jalandhar’s picture

Hi joachim,

Thanks for your information and reviewing my patch.

I have updated the changes with a single patch.

Please review my patch and let me know your suggestions.

Thanks,
Jalandhar.

Jalandhar’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, chnaged_image_module_for_upload_module-1699572-13.patch, failed testing.

joachim’s picture

Your latest, single patch doesn't contain the same changes as the earlier pairs of patches.

Also, you should roll patches from the base folder of the project, not the base of Drupal, as otherwise the testbot fails to apply them.

> When I upload an image in file attachments and list that image

I'm still not sure why this is a problem in this module though. I thought http://drupal.org/project/upload_image's purpose was to move files from being uploaded attachments to being image nodes.

Jalandhar’s picture

Status: Needs work » Needs review
StatusFileSize
new794 bytes

Hi joachim,

If I have used the url of image(sites/default/files/[image-name]) in some of the nodes of my site but when I list the images later then that images path is moving from sites/default/files/[image-name] to sites/default/files/images/[image-name] which results the image is not displaying in the node.

Updated the patch with the base folder of the project

Jalandhar’s picture

Version: 6.x-1.2 » 6.x-1.1

Status: Needs review » Needs work

The last submitted patch, changed_image_module_for_upload_image_issue-1699572-17.patch, failed testing.

Jalandhar’s picture

Version: 6.x-1.1 » 6.x-1.2
Status: Needs work » Needs review
Jalandhar’s picture

Status: Needs review » Needs work

The last submitted patch, changed_image_module_for_upload_image_issue-1699572-17.patch, failed testing.

Jalandhar’s picture

Status: Needs work » Needs review
StatusFileSize
new789 bytes

sorry for my mistake. wrong syntax given for patch.

Status: Needs review » Needs work

The last submitted patch, changed_image_module_for_upload_image_issue-1699572-17.patch, failed testing.

joachim’s picture

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

> If I have used the url of image(sites/default/files/[image-name]) in some of the nodes of my site but when I list the images later then that images path is moving from sites/default/files/[image-name] to sites/default/files/images/[image-name] which results the image is not displaying in the node.

What you're doing is incompatible with how upload_image module works.

You should fix this with a custom module to react to hooks, or use another system for your images.