In order to make this module use SWFUpload correctly, we would have to completely revamp it for Drupal 6....

  • The base SWFUpload module
    • Provides the SWF
    • A new jquery.swfupload.js to use jQuery instead of straight Javascript. This jquery.swfupload.js should be submitted to http://plugins.jquery.com for more support from the jQuery community.
    • hook_swfupload($name, ...) , which is triggered whenever an action is taken with SWFUpload
    • theme_swfupload, which should be used to present a SWFUpload form
  • swfupload_upload.module, which gives the replacement to the upload module form

Once this revamp is complete, other modules, could take advantage of it. This would allow modules like ImageField to allow multiple image uploads to the field, allow multiple images to be uploaded and be made into nodes, etc. It would make the integration of SWFUpload applications very easy to develop.

CommentFileSizeAuthor
#23 swfupload.zip83.71 KBskilip
#12 swfup-5.x-0.x-dev.zip41.62 KBwhisk

Comments

krishaamer’s picture

Subscribing. SWFUpload is a beautiful tool and it would be great to continue using it.

hunvreus’s picture

I am willing to spend some time building this; it actually would properly fit some of the developments I am working on right now, but I am wondering about the current license of it. It seems to be MIT licensed so far; how does this work with Drupal? Should we release a Drupal module providing the jQuery based library and let users upload the Flash files?

It looks like quite some work and debugging action with Firebug but hell, we could really use a nice multi-upload module for Drupal.

grandcat’s picture

Use http://drupal.org/project/image_fupload instead. This works together with swfUpload 2.2.* and image module. Soon, support for CCK + ImageField will be added.

Module is only for Drupal 6 and higher.

whisk’s picture

Rob Loach, very good ideas. I'm currently working on my implementation of SWF Upload with Drupal 5.x (rewriting this module from scratch), and will try to incorporate them.

antonsb’s picture

Hey Guys,

I'm interested in possibly working on this and finishing it off. Do you have any code already? If so, please let me know. I need it to do it myself and it would be great to release it to the open source community.

Thanks,
Anton

(e-mail: t o n y s b @ g m x . n e t )

robloach’s picture

The code that I was hacking at is available through the DRUPAL-5--2 branch.

skilip’s picture

Any progress made yet? I'm willing to spend some time on this project, starting today.

darkodev’s picture

subscribing

hayesr’s picture

Subscribing.

whisk’s picture

Well, it's delayed for a while... But i can post working module source here. Is anyone interested?

skilip’s picture

I'm very interested indeed! Actually I'm was already working on a D6 version for SWFUpload so maybe we can join forces. Can you please send me your latest development version?

whisk’s picture

StatusFileSize
new41.62 KB

Here it is. Packed with SWFUpload.swf for convenience.

UPDATE:
INSTALL.TXT changes.

Tested in Firefox 3, IE 6, Opera 9.5.

erikkramer’s picture

@whisk > is this for D6?

joshk’s picture

subscribing

momper’s picture

subscribing

mecano’s picture

subscribing

skilip’s picture

Almost done with a D6 version of SWFUpload. Here's a little preview:
http://www.pix-pack.nl/drupal/projects/swfupload/SWFUpload.png

whisk’s picture

Wow, that looks good. Will be there a D5 version?

joshmiller’s picture

skilip,

The interface is killer. ETA on Dev code?

Josh

skilip’s picture

Hopefully I will release a dev. snapshot next week. I'm almost done, but need to clean up the code and have to debug it.

momper’s picture

respect :)

Wound’s picture

Fantastic! I am looking for a way to realize something like sound and movie clip upload in an image_fupload fashion for my D6 community site.

Thanks for your work!

skilip’s picture

Assigned: Unassigned » skilip
StatusFileSize
new83.71 KB

Here's my development snapshot of a D6 version. Comments are most welcome, help debugging even more ;). Please read the README!

NOTE: I've used SWFUpload v 2.2!!!

boris mann’s picture

The D6 version looks great. I'm looking for someone to build and contribute back a D5 compatible version. This is paid work. Please contact me.

jojomaniak’s picture

Category: task » support

hello i have installed the swfupload module and it works great! This was definitely what i was looking for for years. Keep on the good job skilip.
if i'll find a bug somewhere around i'll let you know ;-)
thanks.

robloach’s picture

Great work on the Drupal 6 version, skilip! I've given you commit access on the module, so if you want to set up the DRUPAL-6--1 branch, please do! If not, I'd be happy to commit it.

boris mann’s picture

Sounds like skilip is good to go for a D6 branch, and we'll work with him on getting a D5 version backported.

Next up: CCK widget for attaching to filefield and other CCK file types!

dayre’s picture

Been waiting on D6 eagerly... great work ! This is really going to make a big difference for our end users.

hexag’s picture

hey,

firstly, *dude*, heads up, cheers, i'll buy you a pint, your a star, etc, this is grand stuff. worked flawlessly on first install, er, actually flawlessly is not the best choice of words, as i have a quick q which probably lots of people could actually answer. *question warning - probably really dumb*. the files upload flawlessly, the module works, but the files don't go where i tell them to, in the swfupload settings, in file path i put %uid/%file_directory_path, with the theory that the files'll end up in a directory of the user who uploaded them, but, grr, they end up in c:\wamp\tmp. it's a localhost setup for now, this is probably some rookie mistake, but, thanks you some very clever people, i'm within the finish line of my first drupal site!!

thanks, thank you & stuff,

nick,

edit: just wanted to add to any interested party, i've tried a couple of swfupload modules & this one seems to be the most effective for my usage.

skilip’s picture

Hexag,

Nice to hear such cheering words :). The module does not (yet) provide macro's for user ID. The only macro currently provided is %file_directory_path, which is replaced with the files directory path set in admin/settings/file-system. Regularly this is the root folder of your files.

Nonetheless the swfupload module provides a hook function (hook_swfupload()), which enables developers to alter actions. For your specific need, you could use the hook function to upload the files in a separate folder per user. A little example:

/**
 * Implementation of hook_swfupload().
 */
function MODULENAME_swfupload(&$file, $op, &$instance) {
  switch ($op) {
    case 'move_uploaded_file':
      global $user;
      $file->filepath = "files/$user->uid/"; // Files will be stored in an user folder
      break;
  }
}

If you want more macro's for the module (uid, nodetype, ...), you could post a 'feature request' at the issue queue for swfupload module after the dev-snapshot is officially released next week. Please let me know if you haven't done this before, so I can help you out doing so.

All the best!

hexag’s picture

hey skilip,

good thing you offered, as i'd just like to ask which file i put this code into to give it a test?

thanks for your detailed response, i'm just trying to get into the whole hooks thing, so this could be a great way for me to figure it out.

cheers!

nick,

skilip’s picture

Hey hexag,

The hook function can be used in any module you've created. There's a lot of documentation written about hook functions, which I won't cover here. If you want to expand the functionality of SWFUpload, you'd best write a separate module for it. Then, if your module is called for example 'my_test_module', and if you add a function called 'my_test_module_swfupload', the swfupload module automatically 'hooks' in this module on all it's separate actions.

Hope this helps you out,

All the best!

eigentor’s picture

So at the moment everything that it does right out of the box is replace the upload form for attachments, right?
Am very much looking forward to people integrating this into all kinds of modules...
As there is still no batch upload from your local drive for any kind of generic Drupal Image Gallery.
Thumbs up for skilip :)

martin_q’s picture

skillip,

this sounds like awesome work you've been doing. I have a question, and I apologise if it is a dumb one. I have developed my own module for the site I'm working on, which provides upload forms at various points. I'm currently using IMCE but I think this would be slightly more appropriate. So I already have the code to create the forms for the uploading, and those forms already know who is allowed to use them, and the folder that the file is to be deposited in.

What I don't get is, how do I incorporate your work into my module (along the lines of what #33 is looking for)? How do I put an swf upload widget on my module's admin pages?

I've looked around for documentation but haven't found any yet. Please feel free to redirect me if I didn't look hard enough.

Thanks again for your work.

coupet’s picture

Excellent module. hook integration? subscribe.

Nu’s picture

Title: SWFUpload Revamp » SWFUpload-"upload new files" grayed out

I apologize if this is the wrong place for this question. I don't see any place else to post it.

I've installed the current version of SWFUpload on Drupal 6.10, and after initially throwing up a bunch of errors, seemed OK after I reloaded the modules page.

However, when I post a new entry, and expand the "File attachments" item, I see a grayed out button that says "upload new files".

I've tried this on two different installs of 6.1, with the same results.

This was fixed by following the instructions here: http://drupal.org/node/341282

but now I still get error #2038 for all files over 10 MB.

bgedney’s picture

Title: SWFUpload-"upload new files" grayed out » SWFUpload stupid question
Version: 5.x-2.x-dev » 6.x-1.x-dev

Here is the question. I want to integrate SWFUpload as the upload method for the Audio module. I'm a noob at most of this and do very little programming. This is likely more a question related to module development, but here we go; how would I change the upload method of another module to be SWFUpload instead of the standard form? Where would I start looking? Any pointers would be helpful.

Any help would be rad...

Thanks,
Billy

Ifex’s picture

Assigned: skilip » Ifex
Ifex’s picture

Assigned: Ifex » Unassigned
aiwata55’s picture

subscribe

jordanmagnuson’s picture

subscribing.

aiwata55’s picture

Title: SWFUpload stupid question » SWFUpload Revamp

#35 @Nu
#37 @bgedney

The best way to ask a question is, I think, to open a new issue for your specific question here.

P.S.
Changed the title to the original.

skilip’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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