Welcome Guest, Not a member yet? Register   Sign In
Getting uploadify to work
#81

[eluser]pickupman[/eluser]
[quote author="vijaykm" date="1260958231"]hi i have problem in IE 7 while uploading files ..all the session values are destroyed[/quote]
I have had this issue with CI in general before. Just out of curiosity, it sounds silly, but is the time set correctly on your computer. You may also try extending the session time in your config file.

Are you using just a session cookie, or are you storing it in the DB?
#82

[eluser]runrun[/eluser]
I'm all stuck and dont know what to do really.

can some one post a full tutorial (on his/her blog) of how to implement uploadify to CI ? That would appreciated very much, not just me.
#83

[eluser]pickupman[/eluser]
Here's a link to my blog post I posted earlier on this topic.
http://www.reloadedpc.com/code-igniter/j...deigniter/
There is a controller on there as a zip file that should get you going. If you need some help, be a little more descriptive and we can try to figure it out.
#84

[eluser]Fabdrol[/eluser]
I tried to tackle this problem too, but I'm never really happy to 'hack' your way through to get it to work. It's just... not flexible.

Instead, I wrote my own Multi-uploader, based on google gears. It works much better, has much more possiblities (like drag'n'drop, and it's possible to 'pause' uploads and resume them the next day)

For now it's in private beta, but on request I could post the code.
Thing is with flash, gears and whatever... the user needs an plugin. Hopefully multi-file upload will be an W3C standard soon (and implemented in all major browsers, of course)

cheers,
Fabian
#85

[eluser]stuffradio[/eluser]
Can anyone tell me how to add a hidden array to my form when the uploads are complete? This will be for submitting later.

The process:

Upload the images, add the image URLs to a hidden array and add them to the db when I submit the form.

Edit: Nevermind, I got it working Smile
#86

[eluser]FalloutFish[/eluser]
Hey everyone, I'm having an problems getting this to work. I am able to get the standard CodeIgniter file uploading working to the same upload folder, though.

I followed the steps exactly on the blog post at ReloadedPC, but I get the view full of errors with null JSON values when I attempt to upload any file.

When I check the value of "response" on the Uploadify javascript call (just before the post to the view), it shows it as:


Warning: move_uploaded_file(http:/localhost/sm/uploads/1.jpg) [function.move-uploaded-file]: failed to open stream: Invalid argument in c:\users\falloutfish\projects\sm\sm site\js\uploadify\uploadify.php on line 77

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Dev\xampp\tmp\phpFA7C.tmp' to 'http:/localhost/sm/uploads/1.jpg' in c:\users\falloutfish\projects\sm\sm site\js\uploadify\uploadify.php on line 77
{"file_name":"1.jpg","real_name":"1.jpg","file_ext":".jpg","file_size":2.55,"file_path":"http:\/localhost\/sm\/uploads\/1.jpg","file_temp":"C:\\Dev\\xampp\\tmp\\phpFA7C.tmp"}



Some notes: I'm running under XAMPP on Windows. I also had to change the line in uploadify.php from

Code:
$path = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';

to

Code:
$path = $_REQUEST['folder'] . '/';

so it would accurately point to my upload folder.


Also, I tried just posting this to my server to test and I had the same error - although it's Linux.

Any clues as to what I'm doing wrong? Again, the built-in CI upload works just fine.

Thanks for your time.

-FalloutFish
#87

[eluser]runrun[/eluser]
try something like this

$path = FCPATH.'/your_specified_folder'
#88

[eluser]stuffradio[/eluser]
What's the folder in the header script set to? My uploads is at the root dir of my CI install path and in the header script I set the folder to uploads. It works Smile
#89

[eluser]FalloutFish[/eluser]
[quote author="runrun" date="1263383062"]try something like this

$path = FCPATH.'/your_specified_folder'[/quote]

Thanks for the quick reply.

When I echo out $path right after the line as I have it, it looks correct. I don't think it's a path issue exactly. I did try your suggestion and it didn't seem to fix it.

Thanks
-FalloutFish
#90

[eluser]FalloutFish[/eluser]
Actually, I'm an idiot. It was a path issue and your suggestion got me going on it.

I changed the $path back to the original setting of:

Code:
$path = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';

And then I changed the "folder: " property on the Uploadify javascript call to "/mysite/uploads" instead of <?php echo base_url();?>uploads:

Code:
$("#upload").uploadify({
                            uploader: '<?php echo base_url();?>js/uploadify/uploadify.swf',
                            script: '<?php echo base_url();?>js/uploadify/uploadify.php',
                            cancelImg: '<?php echo base_url();?>js/uploadify/cancel.png',
                            folder: '/sm/uploads',

This worked just fine. I just read the post from stuffradio and this is probably what they was referring to as well.


Anyway, thanks to both of you for the help!

-FalloutFish




Theme © iAndrew 2016 - Forum software by © MyBB