Welcome Guest, Not a member yet? Register   Sign In
Upload with progress bar
#1

[eluser]Seich[/eluser]
hi i was wondering is there any way to add a progress bar to the upload form generated with the upload class? Cause i would like to add a progress bar to the upload system.Smile
#2

[eluser]Nick Husher[/eluser]
Upload forms don't know the size of the file they're uploading. You can retrieve how many bytes have passed through the upload form using some creative file inspection, so you could asynchronously display, "Uploaded X KB" as your file is uploading.

You can also do a fake progress bar and use the method OS X uses: A moving candycane bar that displays no progress status except that 'stuff is happening.'
#3

[eluser]Seich[/eluser]
ok thanks i think i will have to stay just like i am right now thanks for the fast reply
#4

[eluser]Myles Wakeham[/eluser]
You will probably find that the best way to do this is to use a Flash or Java applet, or to implement this in AJAX. There are many solutions (a lot are free of charge) that offer this functionality easily. They will call back to your CI code after doing their thing. The problem is that in order to interactively update the user, you need something running asynchronously in their browser to check on the status and report it. That means you need to implement something browser-side, and not server-side as in most PHP & CI code.

Also you should tell us how you are intending on uploading. Is this a HTML upload, or FTP upload?

Myles
#5

[eluser]Nick Husher[/eluser]
Java applets--eeew.

I had assumed he was uploading the file asynchronously through HTTP in an iframe or somesuch. The specific question relates to a progress bar. In order to have a real progress bar that measures what percentage of the file has been uploaded, the total size of the file needs to be known. As far as I know, in html forms, this is impossible. Flash and Java may have this capability, I really have no idea.
#6

[eluser]Seich[/eluser]
... i guess there isn't a really simple way to do this but there are some, javascript libraries that can do it but i am absolutely ignorant to javascript so i guess it is gonna stay like that but thanks for your help.
#7

[eluser]gunter[/eluser]
the best thing I sometimes use is the postlet applet...

http://www.postlet.com/

it let´s upload files by drag n drop...

i made a library from it, maybe I post it sometimes..
#8

[eluser]Seich[/eluser]
i will see what i can do with that, you should upload your library i guess many people might use it Wink
#9

[eluser]Sumon[/eluser]
Sorry that link not works fine. Something may be wrong.




Theme © iAndrew 2016 - Forum software by © MyBB