FileField and ImageField popups uploads broken

Jaza - October 29, 2009 - 02:51
Project:Popups: Add and Reference
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Jaza
Status:needs review
Description

This is related to:

#339196: Image uploading through popups

I've made a patch to make FileField and ImageField uploads work in a popup. I posted the Popups API part of my patch to that thread. I'm posting here the 'add and reference' node form part of the patch.

This is a simple patch that adds a hidden form field to node forms, when they're output in a popup. This form field's value is now checked by popups, instead of using any custom HTTP headers (which don't work when file uploads are involved).

AttachmentSize
popups_reference_image_uploading.patch484 bytes

#1

Jaza - October 29, 2009 - 06:54

Form field properties needed '#' at the start... no idea why it worked before, but it doesn't work for me now.

Updated patch attached.

AttachmentSize
popups_reference_image_uploading.patch 479 bytes

#2

greg.harvey - October 29, 2009 - 09:19

This looks really promising. Subscribing, will try to find time to test. (In combination with your other patch, naturally.)

#3

thekayra - October 29, 2009 - 23:53

subscribing

#4

Jaza - October 30, 2009 - 05:43

Updated patch, for this thread and for:

#339196: Image uploading through popups

See the other thread for details.

AttachmentSize
popups_reference_image_uploading.patch 1.61 KB

#5

PHPepe - October 30, 2009 - 19:21

Jaza,

I still have errors when uploading the image.
A page is loaded with a textarea containing some JSON code.
A screenshoot is attached.

Regards

AttachmentSize
uploadImageError.png 6.26 KB
 
 

Drupal is a registered trademark of Dries Buytaert.