Current image_fupload module requires swfupload.swf, swfupload.js and swfupload.queue.js  to be placed into /image_fupload/swfupload/... directory, but however the module already has swfupload directory it makes impossible to use drush make feature to build complete platforms.

The patch attached it's possible/quick solution using Libraries API http://drupal.org/project/libraries

Comments

wik’s picture

Status: Active » Needs review

subscribing

nasa51’s picture

StatusFileSize
new7.09 KB

same as above, but applicable from image_fupload module root directory, i.e. works with drush make

grandcat’s picture

Sounds interesting. Will be checked.

frankcarey’s picture

Status: Needs review » Needs work

patch failed

patch -p0 --dry-run < image_fupload-swfupload_as_library_0.patch 

patching file .//image_fupload_image/image_fupload_image.module
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file .//image_fupload_image/image_fupload_image.module.rej
patching file .//image_fupload_imagefield/image_fupload_imagefield.module
Hunk #1 succeeded at 69 with fuzz 1 (offset 4 lines).
Hunk #2 FAILED at 98.
1 out of 2 hunks FAILED -- saving rejects to file .//image_fupload_imagefield/image_fupload_imagefield.module.rej
patching file .//image_fupload.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file .//image_fupload.info.rej
patching file .//image_fupload.module
Hunk #1 FAILED at 115.
1 out of 1 hunk FAILED -- saving rejects to file .//image_fupload.module.rej
patching file .//swfupload-settings.tpl.php
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file .//swfupload-settings.tpl.php.rej
frankcarey’s picture

Status: Needs work » Needs review
StatusFileSize
new8.58 KB

OK, I reworked this patch. A few notable changes:

1) not all files live in the root of libraries/swfupload/. For instance the .swf lives in Flash/ and the query.js lives in plugins/ so the new code reflects that. This means that when someone downloads the swfupload library, they don't have to move any files around.

2) The hook_requirements() has been updated to check for the files in libraries, with some clearer instructions I think, and it mentions that you have to dl the 2.2.x version. 2.5.x is out now and it doesn't look compatible yet.

frankcarey’s picture

oh, and the other thing is that this patch will totally break existing sites, as it has new dependencies and the location sof files isn't the same so we may want to find a way to give people a very clear warning before they upgrade.

nasa51’s picture

StatusFileSize
new9.19 KB

Attached patch repeating the functionality of frankcarey's #5, but on top of 3.0-rc2. Just in case ;)

cyberwolf’s picture

Would be great to see this getting committed. Having to copy additional external libraries is a big hassle currently.

Flying Drupalist’s picture

Same, looking for this here.

lpalgarvio’s picture

subscribing :P

zach harkey’s picture

It's been almost a year since this much needed functionality was submitted as a patch. Is there any reason why it can't be committed?

polskikrol’s picture

Agreed, looking forward to this being implemented with library functionality. Subscribing.

lpalgarvio’s picture

+1

nightowl77’s picture

+1 and subscribing

theohawse’s picture

Status: Needs review » Needs work

Patch failed against RC2

patch < image_fupload-swfupload_as_library_1.patch
patching file image_fupload_image.module
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload_image.module.rej
patching file image_fupload_imagefield.module
Hunk #1 FAILED at 65.
Hunk #2 FAILED at 93.
2 out of 2 hunks FAILED -- saving rejects to file image_fupload_imagefield.module.rej
patching file image_fupload.info
patching file image_fupload.install
patching file image_fupload.module
patching file swfupload-settings.tpl.php

And even worse with the latest dev release of image_fupload:

patch < image_fupload-swfupload_as_library_1.patch
patching file image_fupload_image.module
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload_image.module.rej
patching file image_fupload_imagefield.module
Hunk #1 FAILED at 65.
Hunk #2 FAILED at 93.
2 out of 2 hunks FAILED -- saving rejects to file image_fupload_imagefield.module.rej
patching file image_fupload.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload.info.rej
patching file image_fupload.install
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload.install.rej
patching file image_fupload.module
Hunk #1 FAILED at 115.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload.module.rej
patching file swfupload-settings.tpl.php
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file swfupload-settings.tpl.php.rej

Darn.

theohawse’s picture

Tried it with -p0 like frankcarey did and it worked against rc2

patch -p0 < image_fupload-swfupload_as_library_1.patch
patching file .//image_fupload_image/image_fupload_image.module
patching file .//image_fupload_imagefield/image_fupload_imagefield.module
patching file .//image_fupload.info
patching file .//image_fupload.install
patching file .//image_fupload.module
patching file .//swfupload-settings.tpl.php

except now the node edit pages with image_fupload widget are blank :(

doublejosh’s picture

+1

j0nathan’s picture

Subscribing.