The drupal forms API seems like a cleaner way of creating image nodes than the current code. In particular
* the uploaded images will have to obey the constraints on image size set by in the image module admin
* _image_build_derivatives() doesn't have to be called (this is not an image module api function anyway)
* the settings for comments etc. used by image module will automatically be used

The attached patch replaces the current code with a form which is then submitted via drupal_execute().
I've tested it, and it appears to work. I'll wait for a week or two for comments. If I don't hear anything, I'll apply it.

Comments

egfrith’s picture

Status: Active » Needs review
egfrith’s picture

egfrith’s picture

Status: Needs review » Fixed
StatusFileSize
new4.02 KB

I've fixed one or two errors in the previous patch, and have applied the attached patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.