get upload progress in yii & bootstrap - php

I'm using yii-bootstrap to display the progress of a file that is being uploaded in an iframe:
<?php $this->widget('bootstrap.widgets.TbProgress', array(
'type'=>'info',
'percent'=>40,
'striped'=>false,
'animated'=>false,
)); ?>
Is there a native way to find out the progress of the file that is being uploaded in Yii? I don't want to use a Yii extension as I have everything written and uploading correctly already, I just need to display the progress. So really I just need the percentage value.

As Sergey said, it's not possible in pure php to display the progress of an upload. But you could use Javascript to do it.
Here's an example in php and javascript that you could adapt to your need:
A Simple PHP Upload Progress Bar

Related

How to show file uploading progress bar using html form and php code

I am using an HTML form to upload files
and PHP code to save the form file in the directory
and its working fine
But I need to show the progress bar using the browser status bar(shown in image file) or something similar
but now with the jquery etc.
let me know if there is any possible solution with pure HTML and PHP
don't mark my question down I have searched it everywhere
Thanks in advance

Implement the progress bar with the ajaxupload while uploading videos

I need to show the exact time estimated with the nice progress bar while uploading the video.
I am using the ajaxupload js + php codignator for the server side.
jqUploader is a jquery plugin that substitutes html file input fields with a flash-based file upload widget, allowing to display a progressbar and percentage.
http://pixeline.be/experiments/jqUploader/
File Upload widget with multiple file selection, drag&drop support, progress bars and preview images for jQuery.
http://blueimp.github.com/jQuery-File-Upload/
More info: jQuery ajax upload with progress bar - no flash
You will have difficulty doing this on a PHP stack, but if back-compatibility isn't an issue you should check out the HTML5 filesystem API for a possible client-side solution.

how to make an interactive uploader like gmail and facebook have?

I want to make a interactive uploading option like Facebook and gmail have where they show the progress of the current file in uploading and then show the respective image or name of the file over there after the upload.
Right now, i'm using php and normal html for uploading where i send the file from one page to another where php handles it accordingly but i want a interactive one which show the progress also on the same page and then the name of the file after uploading without page refresh.
I knew, it can be done with ajax and css but i don't know how. All i want a interactive upload-er which uploads the file and then provide me the respective file name.
Gmail uses firefox file api, read more about it here https://developer.mozilla.org/en/Using_files_from_web_applications
Or check this live demo
http://robertnyman.com/html5/fileapi-upload/fileapi-upload.html
Hope this will help/solve ur problem ;) best luck

How do you make a progress bar for file upload progress?

Hey guys i'm making a file upload and i can't figure out how i would make a progress bar for it. Does anyone have a resource or reference page which i can look at or even better some source code that works?
Have a look at this:
http://www.uploadify.com/
It is easy to use jquery and php uploading method. you can upload multiple files at a time.
plus you can view their upload progress through a progress bar.
its easy to integerate. the link includes documentation and demo.
here is another link to a beautiful GUI Ajax uploader:
http://www.plupload.com/
You would love it. just browse for and select files to upload. it shows there progress while uploading.
Hope this helps.
There are many options. Try Uploadify, a jQuery plugin for upload progress bars. Specifically, the download includes a PHP example.

Uploading and Styling File With PHP and Jquery

I have a form where the admins will be uploading more then 2 pictures at a time, i had been using the basic HTML file input style, however i want to do more with it as i am using a beautiful admin theme from themeforest, (the author haven't included the styled file input element in skin), i want to do it manually. which should meet the following requirement
a) A styled file input element should
be displayed first
b) When the user gives the file input
it should automatically upload the
file using php
c)while uploading the file i want to
see the file upload progress with tool
tip
d)once all the files are uploaded the
user should be able to process the
form with already uploaded file.
I want to admit that i have a very basic understanding of how javascript and Jquery works, however i am quite good at PHP, HTML and CSS.
I want some kinda tutorial regarding how do i style my file input to fill my need.
i am searching something like this.. File Upload
thank you
The only thing that fulfills all your requirements in a way that works with most browsers at the moment is a Flash-based uploader like SWFUpload or Uploadify.
Use SWFUpload. Look its FEATURES DEMO. It has almost everything.

Categories