Hello,

Forgive me if I'm incorrect, but it seems that imagecache currently can't handle display of images that haven't been fully uploaded and "submitted". For example:

Say I'm creating a new node, so I upload an image and add some imagecache based image code into the "body" and hit "preview". As the actual file isn't in place yet (before submit), imagecache returns "page not found" for the new version. The actual file is still in the temp upload directory, but that information is availble via _SESSION.

I'm currently looking into the idea of checking that as a fallback when the file isn't found before sending a page not found.

I'm curious if I'm not seeing things correctly or just waaaay off base on this? :)

Thanks..

CommentFileSizeAuthor
#1 imagecache_11.patch3.45 KBMoonshine

Comments

Moonshine’s picture

Version: 5.x-1.2 » 5.x-1.3
Status: Active » Needs review
StatusFileSize
new3.45 KB

As mentioned previously, imagecache currently doesn't handle freshly uploaded images which are still in "temp" and being previewed. I've added code that falls back to check for these new uploads if imagecache doesn't find the submitted file in place yet. The derivatives are created, delivered and deleted. The code could be condensed a bit, but I thought this might be easier to read to start. Let me know what you think, I'd love to see it added so I don't have to patch imagecache every release :)

Aleet’s picture

Hi moonshine,

this throws an error for me:

@@ -226,6 +279,36 @@ function imagecache_cache() {
}

Moonshine’s picture

You got an error applying the patch to the source? Are you starting w/ 5.x-1.3 of imagecache and what error did you get when using patch?

Moonshine’s picture

Any comments on including this? I can't be the only one that previews things with inline images. :)

dopry’s picture

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

This is done in head... I won't be backporting to 1.3