mcguffin / acf-dropzone

Drop file uploads directly on ACF file fields
https://wordpress.org/plugins/acf-dropzone/
GNU General Public License v3.0
32 stars 1 forks source link

Doesn't work with Repeater fields #1

Closed s7media closed 5 years ago

s7media commented 5 years ago

Hi there, great little plugin! Glad I came across it.

I've just tried it with a Repeater field, and what happens is, if there are no rows, the drag and drop won't work - for example if it is an image, the browser just opens the image as a file rather than dropping it on the repeater field (which should then make a row).

Also, if there are existing rows, it knows to drag and drop, but say I have multiple images selected, it'll upload all images, but pick the last one as the selected image on that row, and doesn't create new rows for all others.

Just thought it was worth a mention :)

Thanks

mcguffin commented 5 years ago

Hi @s7media,

You're welcome!

I've just tried it with a Repeater field, and what happens is, if there are no rows, the drag and drop won't work - for example if it is an image, the browser just opens the image as a file rather than dropping it on the repeater field (which should then make a row).

This is because a repater field can contain between zero and infinitie file, image or gallery fields. Assuming a repeater row contains multiple Image, file and gallery fields – which fields would be the ones to receive the dropped files? I'm afraid, I can't think of a way to join repeaters and drag-drop-upload to a straightforward feature ...

(Off-Topic: For enhanced repeater-convenience you might have a look at this little fellow.)

mcguffin commented 5 years ago

@s7media I just realized that ACF is adding repeater rows when multiple files are selected. Didn't know before. So, yes, I'll look into this.