I have written a contribution module to the drupal image module , that allows users to upload images using a Java applet ( jUpload ). A pretty idiot-proof solution for having people upload galleries to your website.

In attachment you can find the module ( rename .txt to .tgz ), you can try it by unpacking it in the modules/image/contrib. directory and activating it.

Some advantages that the module provides – which were the reasons for me to create it :
- The applet allows (unattended) bulk-uploading of pictures.
- Doesn't require FTP access
- Uses the standard Drupal module permission system to allow/disallow access to the module ( no need to maintain a set of FTP accounts )
- Integrates with the image gallery module. If this module is activated , you can choose the gallery to import the pictures into. ( like the image_import module does )
- Jupload (http://jupload.sourceforge.net/ ) allows client-side resizing of your pictures before uploading them ( can be configured in the Drupal module settings page of this module )
- Jupload allows rotating pictures before uploading them.

Please consider adding this to the image module.

Comments

sageroo’s picture

I keep getting this error when I try uploading via Jupload:

09:08:29.438 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:486)
09:08:29.439 [ERROR] wjhk.jupload2.exception.JUploadExceptionUploadFailed: Received HTTP status 404 Not Found
09:08:29.439 [ERROR] at wjhk.jupload2.policies.DefaultUploadPolicy.checkUploadSuccess(DefaultUploadPolicy.java:550)
09:08:29.439 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:731)
09:08:29.439 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:486)

Can you tell by first glance if I have it set up wrong or what's going on.

This looks like a great addition to Image. I hope I can work out the problems.

Thanks,
Sage

sponnet’s picture

Hm,
1. Please verify if the path http://yoursite.com/admin/content/image_jupload/post exists and is accessible to you by typing it in the URL bar.
2. If so , you could try editing the module and on line 75 you should read:
<param name="postURL" value="image_jupload/post" />
Try changing that to
<param name="postURL" value="admin/content/image_jupload/post" />
and check if that works...

sponnet’s picture

update: using this code seems to work here :
<param name="postURL" value="'.url("admin/content/image_jupload/post").'" />
This looks more solid than using a relative or absolute path... comments are welcome..

sageroo’s picture

Do you have any other ideas? It doesn't seem to be working with that new piece of code.

Here are the errors.
21:00:22.500 [ERROR] wjhk.jupload2.exception.JUploadException: HTTP response did not begin with status line.
21:00:22.500 [ERROR] at wjhk.jupload2.upload.FileUploadThreadHTTP.finishRequest(FileUploadThreadHTTP.java:402)
21:00:22.500 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:726)
21:00:22.500 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:486)

Thanks

sponnet’s picture

Did you check if the post URL is accessible when you enter the URL in your browser ?
Try adding <param name="debugLevel" value="100"/> to the applet code. This will give you much more info about what the applet is doing , and what mght go wrong. Feel free to paste some relevant debug information so that I can take a look into it.

For more info about the jUpload applet, check out the documentation on the applet's parameters http://jupload.sourceforge.net/howto-customization.html

Thanks !

Stefaan

sageroo’s picture

PicturePanel.calculateOffscreenImage(): trying to calculate offscreenImage (PicturePanel.calculateOffscreenImage()
08:16:39.166 [DEBUG] freeMemory (after start of getBufferedImage) : 5366960
08:16:39.399 [DEBUG] freeMemory (after end of getBufferedImage) : 5803624
08:16:39.402 [DEBUG] bufferedImage MinX (BufferedImage@846aed: type = 13 IndexColorModel: #pixelBits = 8 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@882dfc transparency = 2 transIndex = 255 has alpha = true isAlphaPre = false ByteInterleavedRaster: width = 48 height = 48 #numDataElements 1 dataOff[0] = 0): 0
08:16:39.408 [DEBUG] bufferedImage MinY (BufferedImage@846aed: type = 13 IndexColorModel: #pixelBits = 8 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@882dfc transparency = 2 transIndex = 255 has alpha = true isAlphaPre = false ByteInterleavedRaster: width = 48 height = 48 #numDataElements 1 dataOff[0] = 0): 0
08:16:39.412 [DEBUG] bufferedImage Width (BufferedImage@846aed: type = 13 IndexColorModel: #pixelBits = 8 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@882dfc transparency = 2 transIndex = 255 has alpha = true isAlphaPre = false ByteInterleavedRaster: width = 48 height = 48 #numDataElements 1 dataOff[0] = 0): 48
08:16:39.416 [DEBUG] bufferedImage Height (BufferedImage@846aed: type = 13 IndexColorModel: #pixelBits = 8 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@882dfc transparency = 2 transIndex = 255 has alpha = true isAlphaPre = false ByteInterleavedRaster: width = 48 height = 48 #numDataElements 1 dataOff[0] = 0): 48
08:16:39.494 [DEBUG] freeMemory (after end of wjhk.jupload2.filedata.PictureFileData.getImage()) : 5734104
08:16:45.293 [DEBUG] Action : Remove Selected
08:16:45.603 [DEBUG] PicturePanel.paint(): offscreenImage is null
08:16:49.246 [DEBUG] Action : Upload
08:16:49.641 [DEBUG] Upload done by using the wjhk.jupload2.upload.FileUploadThreadHTTP class
08:16:49.647 [DEBUG] Timer started
08:16:49.752 [DEBUG] freeMemory (after hasToTransformPicture) : 6693536
08:16:49.755 [DEBUG] Argentina.gif : hasToTransformPicture = false
08:16:49.831 [DEBUG] freeMemory (after hasToTransformPicture) : 6697744
08:16:49.833 [DEBUG] Australia.gif : hasToTransformPicture = false
08:16:49.851 [DEBUG] file 0: content=2513 bytes, getAdditionnalBytesForUpload=942 bytes
08:16:49.864 [DEBUG] chunkHttpParam: jupart=0&jufinal=1
08:16:49.870 [DEBUG] Using non SSL socket, direct connection
08:16:49.922 [DEBUG] === main header (len=397):
08:16:49.922 [DEBUG] POST /?q=admin/content/image_jupload/post HTTP/1.1\r\n
08:16:49.922 [DEBUG] Host: marrs-sactown.com\r\n
08:16:49.922 [DEBUG] Accept: */*\r\n
08:16:49.922 [DEBUG] Accept-Encoding: identity\r\n
08:16:49.922 [DEBUG] Connection: close\r\n
08:16:49.922 [DEBUG] Content-Type: multipart/form-data; boundary=---------------------------vioydqwl8h4\r\n
08:16:49.922 [DEBUG] Content-Length: 3608\r\n
08:16:49.922 [DEBUG] \r\n
08:16:49.922 [DEBUG] -----------------------------vioydqwl8h4\r\n
08:16:49.922 [DEBUG] Content-Disposition: form-data; name="q"\r\n
08:16:49.922 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
08:16:49.922 [DEBUG] \r\n
08:16:49.922 [DEBUG] admin/content/image_jupload/post\r\n
08:16:49.925 [DEBUG] === main header end
08:16:49.928 [DEBUG] --- fileheader start (len=736):
08:16:49.931 [DEBUG] -----------------------------vioydqwl8h4\r\n
08:16:49.931 [DEBUG] Content-Disposition: form-data; name="taxonomy"\r\n
08:16:49.931 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
08:16:49.931 [DEBUG] \r\n
08:16:49.931 [DEBUG] 0\r\n
08:16:49.931 [DEBUG] -----------------------------vioydqwl8h4\r\n
08:16:49.931 [DEBUG] Content-Disposition: form-data; name="mimetype[]"\r\n
08:16:49.931 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
08:16:49.931 [DEBUG] \r\n
08:16:49.931 [DEBUG] image/gif\r\n
08:16:49.931 [DEBUG] -----------------------------vioydqwl8h4\r\n
08:16:49.931 [DEBUG] Content-Disposition: form-data; name="pathinfo[]"\r\n
08:16:49.931 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
08:16:49.931 [DEBUG] \r\n
08:16:49.931 [DEBUG] /Users/sage/Pictures/iChat Icons/Flags\r\n
08:16:49.931 [DEBUG] -----------------------------vioydqwl8h4\r\n
08:16:49.931 [DEBUG] Content-Disposition: form-data; name="relpathinfo[]"\r\n
08:16:49.931 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
08:16:49.931 [DEBUG] \r\n
08:16:49.931 [DEBUG] Pictures/iChat Icons/Flags\r\n
08:16:49.931 [DEBUG] -----------------------------vioydqwl8h4\r\n
08:16:49.931 [DEBUG] Content-Disposition: form-data; name="File0"; filename="Argentina.gif"\r\n
08:16:49.931 [DEBUG] Content-Type: image/gif\r\n
08:16:49.931 [DEBUG] \r\n
08:16:49.933 [DEBUG] --- fileheader end
08:16:49.937 [DEBUG] in UploadFileData.uploadFile (amount:2513, getUploadLength(): 2513)
08:16:49.970 [DEBUG] --- filetail start (len=206):
08:16:49.975 [DEBUG] \r\n
08:16:49.975 [DEBUG] -----------------------------vioydqwl8h4\r\n
08:16:49.975 [DEBUG] Content-Disposition: form-data; name="md5sum[]"\r\n
08:16:49.975 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
08:16:49.975 [DEBUG] \r\n
08:16:49.975 [DEBUG] c1010a745cdf9c2c849752589ff8e182\r\n
08:16:49.975 [DEBUG] -----------------------------vioydqwl8h4--\r\n
08:16:49.978 [DEBUG] --- filetail end
08:16:50.580 [DEBUG] PicturePanel.paint(): offscreenImage is null
08:16:51.604 [DEBUG] -------- Response Headers Start --------
08:16:51.615 [DEBUG] First line of response: 'HTTP/1.1 403'
08:16:51.628 [ERROR] Upload stopped with errors
08:16:51.639 [ERROR] wjhk.jupload2.exception.JUploadException: HTTP response did not begin with status line.
08:16:51.639 [ERROR] at wjhk.jupload2.upload.FileUploadThreadHTTP.finishRequest(FileUploadThreadHTTP.java:402)
08:16:51.639 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:726)
08:16:51.639 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:486)
08:16:51.641 [DEBUG] -------- Response Body Start --------
08:16:51.646 [DEBUG]
08:16:51.649 [DEBUG] --------- Response Body End ---------
08:16:51.651 [ERROR] wjhk.jupload2.exception.JUploadException: HTTP response did not begin with status line.
08:16:51.651 [ERROR] at wjhk.jupload2.upload.FileUploadThreadHTTP.finishRequest(FileUploadThreadHTTP.java:402)
08:16:51.651 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:726)
08:16:51.651 [ERROR] at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:486)
08:16:51.655 [DEBUG] FileUploadThread: within run().finally
08:16:51.952 [DEBUG] JUploadPanel: after !fileUploadThread.isAlive()

sponnet’s picture

Hi,
It looks like a permission problem, your post returns a 403 error :
08:16:51.615 [DEBUG] First line of response: 'HTTP/1.1 403'
Your applet is posting to 08:16:49.922 [DEBUG] POST /?q=admin/content/image_jupload/post HTTP/1.1\r\n

What happens if you use your browser to surf to /?q=admin/content/image_jupload/post in your site ? Do you also get a 403 error ?

Please check your site's logs if anything useful shows up there, and let me know !

Stefaan

sageroo’s picture

Thanks for wading through my code.

When I surf to /?q=admin/content/image_jupload/post it takes me to my front page - index.html. It doesn't give me a 403 error.

Thanks for looking into this — I really appreciate it.

sponnet’s picture

No problem, let me know if you get it to work. And if you like the new method of uploading :)

Stefaan Ponnet

ThriLLz’s picture

i can't see the attached txt file... could you reupload it?
i want too use jupload, its awsome...!!

joachim’s picture

neither can I... looks like the file's corrupt.
subscribing.

sponnet’s picture

StatusFileSize
new163.74 KB

Here's the file once again.
Instructions:
- move this file into drupal/modules/image/contrib
- unpack it ( tar zxvf image_jupload.tgz )

You should now have a subdirectory drupal/modules/image/contrib/image_jupload/ containing
image_jupload/
image_jupload/image_jupload.info
image_jupload/image_jupload.module
image_jupload/wjhk.jupload.jar

Just activate the module.

Let me know if it works , and if you like it.

Stefaan Ponnet

drewish’s picture

sponnet, i haven't been able to dig into this right now but you've got some formatting issues that you should address. consult the coding standards: http://drupal.org/coding-standards

naiptol’s picture

Hello,
(sorry for bad english)
I have problem with this module
I can select files, and it looks like it is transfering them, but files do not appear in any directory.
I created admin/content/image_jupload/post in drupal dir, but files are not here too.

file jupload_42238_log.txt shows (debug is on)

...
15:22:46.509 [ERROR] Unexpected HEAD response: ''
15:22:46.509 [DEBUG] cookie: SESS07535bb73ef3841cf198de3fd7f7e57c=62f2f71013e7cc0576c5954957df46aa; has_js=1
15:22:46.509 [DEBUG] userAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; lt; MEGAUPLOAD 1.0; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8
15:22:46.509 [WARN] Invalid int value: , using default value: -1
15:22:46.524 [WARN] Invalid int value: , using default value: -1
...
... (and then for each file:)
15:24:13.572 [DEBUG] -------- Response Body Start --------
15:24:13.588 [DEBUG]
15:24:13.588 [DEBUG] Fatal error: Call to undefined function: _image_import_file() in d:\Vertrigo\Apache\htdocs\design\modules\image\contrib\image_jupload\image_jupload.module on line 96
15:24:13.588 [DEBUG] --------- Response Body End ---------

Image Import module (5.x-1.4) is turned on.
Have the same situation on 2 different servers.

Help me, please! :)
....

drewish’s picture

Status: Active » Needs work

i ran into similar issues. i haven't had a chance to really look into why though.

sponnet’s picture

The function _image_import_file() is defined in the image_import.module, which I re-use.
If the module image_import is active, this function should be exposed to this module too.
Could this have something to do with the order in which module files are loaded on bootstrapping a drupal page? I guess not...

I'll look into it.

drewish’s picture

humm, that's should be a problem. as long as they're both enabled you can call the other module's functions.

sponnet’s picture

StatusFileSize
new163.8 KB

Hi,

Apparently the function I use was recently (?) renamed to 'image_create_node_from()', I adapted the module so that it uses this function of the 5-x.1.6 image module.
I attached the new module here. I've checked this module with a fresh install of the 5-x.1.6 version of the image module, and this seems to work.

Apparently the code needs some more error-checking because this error went unnoticed ( the php code failed because of a syntax error ( function not defined ) and quits processing, causing the page load to fail, so I didn't see anything in the drupal logs either..)

Give it a spin,

Stefaan

naiptol’s picture

I am trying this new version, and have another problem

It is looking for directory /lt/admin/content/image_jupload/post/ (i use i18n and "lt" is for lithuanian language)

if i create such directory i can't enter admin menu -- "You don't have permission to access /lt/admin/ on this server."

then i change path in image_jupload.module to tmp/post and create /lt/tmp/post with 777 rights

but i get "unable to access the posturl http://mysiteaddr/lt/tmp/post

ilbeppe’s picture

Any news???

sponnet’s picture

Please send me more user experiences. Does this module work for you ? What are the problems getting it to do what it's supposed to do ? Suggestions on the functionalities ? I'd be happy to include them .

Happy holidays!

Stefaan

ThriLLz’s picture

hey sponnet,

its working perfectly!
everything uploads how it should, but i have just some other feauture requests...
right now i just can choose the gallery where to put the images in, could you add the feature to create gallerys also?

sponnet’s picture

Version: 6.x-1.x-dev » 5.x-1.7
Category: feature » task
Status: Needs work » Active
StatusFileSize
new163.64 KB

Here's an update for this module that works with Image module 5.x-1.7

bflora’s picture

Yo, I just wanted to say that this module is an answer to prayers for me. I'm running Image 5.1.8 and its working pretty well.

Here's some usability feedback:

1. After my photos upload......nothing happens. The applet should close and take you to the new gallery, or display a "finished" popup with a link. As it is now, it's very confusing. I'm going to have to write some text for my users telling them not to panic when nothing happens at the end of the upload.

2. Could there possibly be some way to write custom titles for the photos during upload? That would really put this over the top in my opinion. Having photo.jpg as my node title is really unappealing.

Otherwise I'm loving this!

sponnet’s picture

Bflora,

1: should not be too difficult to do , I believe that you can tell the applet what to do when it finished.. I'll look into it.
2: I'm afraid that the applet would need some work to be able to do this, because I don't believe this is possible with the current applet.
It would be however possible to show some edit boxes after the upload that allows you to change the names..

Also I'm thinking of adding the possibility to add a gallery when uploading some images. Right now , you still need to create a gallery first , and then upload some images into it with the jupload module.

I'll think of a way to get that done.

Stefaan Ponnet

bflora’s picture

Hi, Stefaan,

Again, great work on this. For what its worth, I think the "create gallery at time of upload" would be a nice feature, but not a must have. I think this redirection after upload is a higher proiority (and it sounds like a quicker fix) as its the final piece of what's shaping up to be a really slick, useful tool. I'd get that taken care of first.

Your suggestion about having some edit boxes after upload sounds perfect. That would be an excellent solution. It sounds much better than fudging with the applet itself.

Brad

Hetta’s picture

marked http://drupal.org/node/150748 as duplicate.

icecreamyou’s picture

subscribing

...great work so far.

Leeteq’s picture

Subscribing.

mediabounds’s picture

Version: 5.x-1.7 » 6.x-1.0-alpha1

Any developments for getting this migrated for Drupal 6?

mbria’s picture

Subscribing.

grandcat’s picture

Status: Active » Closed (fixed)
1kenthomas’s picture

Version: 6.x-1.0-alpha1 » 5.x-1.7

Restoring original (correct) version that this thread applied to.

Anyone know why this was never rolled as a module?

barm’s picture

Status: Closed (fixed) » Active

All is working! Thank you!
But:
Every time applet is initializing I have this error:
15:21:59.625 [INFO] lang = null, taking default language
15:21:59.640 [INFO] Debug level set to 0
15:21:59.640 [INFO] Current debug output file: C:\DOCUME~1\vv\LOCALS~1\Temp\jupload_54463_log.txt
15:22:01.765 [INFO] Debug level set to 1
15:22:01.765 [INFO] Current debug output file: C:\DOCUME~1\vv\LOCALS~1\Temp\jupload_54463_log.txt
15:22:01.781 [ERROR] Unexpected HEAD response: ''

And becase of the error I can't to hide debug window for users.

How to eliminate this error?

I found that there is new version of applet (3.5). Will it possible to use it for Drupal?

sponnet’s picture

Version: 5.x-1.7 » 6.x-1.x-dev
StatusFileSize
new167.33 KB

Here's an update for this module for Drupal 6.x

There are some nice features about the new 3.x version of the JUpload applet. I'm thinking of adding a seperate page that would let the user view the uploaded pictures in a sort of gallery view for post-processing ( edit image fields e.g. title/body , add taxonomy, ... ).

How would you like to see this overview page ? Some ideas would be welcome.

barm’s picture

How to eliminate the error?
[ERROR] Unexpected HEAD response:

version is for 5.x.

Thank you in advance.

plasticlax’s picture

i would pay you to make this upload to new or existing nodes having at least one multiple imagefield.

sponnet’s picture

Do you mean integrating this functionality in the form where you create / edit a node ?

plasticlax’s picture

i mean that currently there is no easy way to mass upload images using imagefield, at least not as multiple imagefields.
some of us have to give up on image module. but this uploader worked so well, it would be nice to see it applied to imagefield. batch multi-upload to imagefield is only possible using imagefield_zip or something, and the mass flash uploaders are harder to setup and currently only work with single imagefields, so there is still one node per image. i think a lot of people are waiting for this functionality for some reason. of course it would be nice to upload to the imagefield of an existing node or create one on the fly (of any type containing imagefields).

plasticlax’s picture

why isn't this a normal drupal module?

grandcat’s picture

It doesn't function in a lot of cases because of security settings on some provider.

plasticlax’s picture

i don't know anything about making drupal modules, but when i compare your save function and the save function from an imagefield based project like imagefield import i see that you call image_create_node_from() whereas ... well i just post the two functions for comparison.

function _jupload_post() {

  foreach ($_FILES as $file => $fileArray) {
    $filename = $fileArray['tmp_name'];
    if ($filename) {
	$target = file_directory_path().'/images/'.$fileArray['name'];
	move_uploaded_file($fileArray['tmp_name'], $target);
        $node = image_create_node_from(
		$target,
		$fileArray['name'],
		'',
	        array ($_POST['taxonomy'])	
	);

    }
  }
  echo "SUCCESS";
}

the imagefield way (obviously the post data is formatted differently):

function _imagefield_import_create_node($node_type, $files, $title, $caption, $taxonomy) {
  // For node_object_prepare()
  module_load_include('inc', 'node', 'node.pages');
  $node = new stdClass();
  $node->type = $node_type;
  $node->title = $title;
  $node->body = $caption;
  node_object_prepare($node);
  $node->field_caption[0] = array('value' => $caption);
  $node->taxonomy = $taxonomy;
  // Get the filefield module to do the saving and marking the record as permanent.
  foreach ($files as $field_name => $file) {
    if (isset($node->$field_name)) {
      array_push($node->$field_name, $file);
    }
    else {
      $node->$field_name = array(0 => $file);
    }
  }
  $node = node_submit($node);
  node_save($node);
  return $node;
}

but that example still creates one node for each image, and what people want now is multiple attachments per node.

album_photos_swfu (for d6, uses filefield not imagefield, but it is an example of MULTI-field-on-single-node mass uploader) does it like this:

if(is_uploaded_file($_FILES['Filedata']['tmp_name']) && !$_FILES['Filedata']['error']){
			$user = user_load(array('uid' => $uid));
			$limits = _upload_file_limits($user);
			$path = _photos_check_path();
			$files = new stdClass();
			$ext = end(explode('.',$_FILES['Filedata']['name']));
			$files->filesize = $_FILES['Filedata']['size'];
			if(variable_get('photos_rname', 0)){
				$name = round(rand(15770,967049700)).time().'.'.$ext;
			}else{
				$name = $_FILES['Filedata']['name'];
			}
			$files->filepath = file_destination(file_create_path($path .'/'.trim(basename($name))),FILE_EXISTS_RENAME);
			$files->filename = end(explode('/',$files->filepath));
      if(is_numeric($_GET['pid'])){
        $node = node_load($_GET['pid']);
        if(node_access('update', $node)){
  				$files->pid = $node->nid;
  				$files->title = $node->title;

and i think this is how album_photos does it to an existing node:

if ($user = user_load(array('uid' => $uid))) {
		if(node_access('update', $node) && is_uploaded_file($_FILES['Filedata']['tmp_name']) && !$_FILES['Filedata']['error']){
			$limits = _upload_file_limits($user);
			$path = _photos_check_path();
			$files = new stdClass();
			$ext = end(explode('.',$_FILES['Filedata']['name']));
			$files->filesize = $_FILES['Filedata']['size'];
			if(variable_get('photos_rname', 0)){
				$name = round(rand(15770,967049700)).time().'.'.$ext;
			}else{
				$name = $_FILES['Filedata']['name'];
			}
			$files->filepath = file_destination(file_create_path($path .'/'.trim(basename($name))),FILE_EXISTS_RENAME);
			$files->filename = end(explode('/',$files->filepath));
      if($node->type == 'photos'){
				$files->pid = $node->nid;
				$files->title = $node->title;
      }else{
				$files->nid = $node->nid;
				$files->title = $node->title;
        if(is_numeric($_GET['pid'])){
          $node = node_load($_GET['pid']);
          if(node_access('update', $node)){
    				$files->pid = $node->nid;
    				$files->title = $node->title;

but there's not much documentation and i haven't looked at the api myself yet and am not sure if this is helpful, but it is what i am looking at to learn, for all i know i completely misinterpreted the code i have provided above.

anyway, it would be nice to have a non-flash mass-uploader for imagefield for d5.

sun’s picture

Status: Active » Closed (won't fix)

As mentioned in #32, I think that image_fupload is the way to go here. I did not look at its code though. However, given that Java is not as widely available as Flash, it does not sound like the proper approach.

plasticlax’s picture

fupload was suggested as a solution to uploading in d6, nobody's solution yet does multiple imagefields.

awolfey’s picture

subscribe

awolfey’s picture

I've just released a bulk uploader for D6 for imagefield, using jupload.

http://drupal.org/project/jifupload

sponnet’s picture

nice !