Hi

I am using this module for conversion of pdf to image. But finding issue, when used s3 storage.

The highlighted line returns blank, which halts successive functionality. Its indirectly using S3fs modules streamwrapper class (Attached), where realpath() returns blank.

Can any one help me here?

Comments

nilesh.gaikwad created an issue. See original summary.

dman’s picture

Title: PDF to image conversion does not work for S3 storage » PDF to image conversion does not work for remote file wrappers (like S3 storage)
Category: Bug report » Feature request

Yeah, that would be a known issue.
Remote filesystems and CDNs etc are not internally supported, as the process that actually runs is a cli (imagemagick) command that operates on locally available files only. The Drupal PHP filesystem wrappers will not work there.

What would probably be needed would be a process that temporarily copies the 'attached' file down to a local folder, runs the process then cleans up. That's quite a lot of extra work, and it's not done yet.
If someone wants to have a go at that or sponsor it, I would be happy to see about reviewing and folding this feature in.

We also have/had a similar challenge over in imagecache_actions where the cli processes need access to a non-local resource. #2325141: Remote File Support for S3 Bucket (allow URL Stream Wrappers to be used)

nilesh.gaikwad’s picture

Hi
I tried that getting the file down to local using wget.

But we had one more problem while using load balancer. I have two drupal machines running on load balancer.
While we download, it gets downloaded it gets downloaded on 1/2 machine, and while reading it reads some other machine. So getting Invalid file issue.

Second issue I faced, while coversion if same file is on another Drupal instance, then some images gets generated on different Drupal box, that is sync up issue.

Can any one give me pointers to deal with this issue?

tomhollevoet’s picture

StatusFileSize
new3.85 KB

I fixed this issue.
First i create a temporary file with file_directory_temp() function.
After the creation of the image, i move the file to the new (real) location with file_unmanaged_move().
See patch.

tomhollevoet’s picture

Status: Active » Needs review
Christopher Riley’s picture

Has there been any movement on this as I am in a multi-server environment and running into the same issue I believe.

hitchshock’s picture

Status: Needs review » Closed (outdated)

We stopped supporting the D7 version, so the ticket will be closed, but thanks to everyone who was working on the ticket!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.