Welcome Guest, Not a member yet? Register   Sign In
File uploads and ajax insight
#1

[eluser]stevefink[/eluser]
Hi all,

I'm kind of at a writer's block. I'm looking for some unobtrusive yet elegant ways of handling an upload form for a user. The user wants to be able to upload a directory filled with images if possible, or one at a time. I'll store image names/paths in a table. I was wondering if anyone would be kind enough to show me some examples of file uploads with progress bars and ajax in a code igniter application?

Any hints/ideas would be appreciated. :-)

Thanks all and have a great weekend!

- sf
#2

[eluser]stevefink[/eluser]
Also, as much as I despise MySpace, I love their interface for uploading photos. Allows multiple files at once, and their progress bar shows once they're validated and uploading. :-)
#3

[eluser]stevefink[/eluser]
Eeeep, hate talking to myself, but I must reply to my own thread one last time. :-)

Has anyone ever tried integrating http://www.radinks.com/upload/ with code igniter?
#4

[eluser]Skulls[/eluser]
that upload in java is nice ... but the user has to have the java installed on the computer....
#5

[eluser]phester[/eluser]
stevefink, have you found an example that you can share with us? I am looking for a similar upload logic like myspace.

Thanks,
#6

[eluser]stevefink[/eluser]
Phester -

I actually do have an example I can share. :-)

This uses SWFUpload (http://swfupload.mammon.se/) which requires a Flash container in your application. If you are sure your surfers can depend on Flash (myspace uses flash also..) then this might serve as a good example.

http://devel.phpgeek.org/console

login with user: admin pass: f1auto

Click on add vehicle and put in some arbitrary data... this will take you to a photo uploads page. Feel free to poke around... and as always I'm available to help with any questions/comments/concerns.

Cheers and good luck!

- sf
#7

[eluser]Majd Taby[/eluser]
stevefink, have you seen facebook upload? it's by far the best implementation i've seen, you should check it out
#8

[eluser]dmcb[/eluser]
I'm trying to implement swfupload on my code igniter site, but no luck. Everything works except the upload script swfupload calls after each successful upload doesn't work if I'm pointing at a controller function. It works when I point it to an upload php script outside of code igniter, but I really want to use the controller function. Is there any problem with this?

In my view, during the swfupload definition:
Code:
upload_target_url: "http://www.mysite.com/member/profile_upload_script"

And my member controller:
Code:
function profile_upload_script()
    {
        $this->load->helper('file');
        write_file('/relativeserverpath/blah.text', "lol");
    }

Swfupload never hits the function, or if it does, it won't run my write script, or any CI file upload code (not seen here). When I hit the controller function on my own, the test file gets written.

When I change the upload target url in my view to a php file outside of CI, everything works fine.
#9

[eluser]dmcb[/eluser]
Ah, I figured it out. If you are using swfupload, pay heed to the warning about no session data going to the upload script. I had the upload script in my controller for being logged in, so it wouldn't detect your were logged in and then redirect you out, and all this was happening in the backend, so the actual upload page looked like it was working fine.

I'd recommend placing the upload script function within it's own controller.
#10

[eluser]FnTm[/eluser]
Its seems, that the site isnt working anymore. Could someone plz share the files for this great uploader?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB