Re: basic Ajax file uploading

2006-10-24 Thread Brian French




Thanks alot nate! Is there any example of this anywhere?

nate wrote:

  
how do i get it to properly upload the file?

  
  
You don't.  Because of the way the XHR transport layer works, you can't
use it to send actual file data.  What you *can* do is have the upload
form POST to an iframe, and use a separate set of asynchronous requests
to monitor it's progress.




  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---





basic Ajax file uploading

2006-10-23 Thread Brian French

I have a form which is submitted via ajax. I have a field in this form 
which needs to be a file upload. below is the smippet of code. it's only 
sending me the local location of the file and not the actual file data. 
how do i get it to properly upload the file?

form onsubmit=return false; enctype=multipart/form-data
div class=optional
?php echo $form-labelTag('Reviselog/revfile', 'Revfile');?
 ?php echo $html-file('Reviselog/revfile', array('size' = '60'));?
?php echo $html-tagErrorMsg('Reviselog/revfile', 'Please enter the 
Revfile.');?
/div
div class=submit
?php echo $ajax-submit('Add', array('url' = 
'/reviselogs/add/'.$task['Task']['id'],'update' = 
'tabcontent','loading'='showTabSaving();','enctype'='multipart/form-data')); 
?
/div
/form

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: basic Ajax file uploading

2006-10-23 Thread nate

 how do i get it to properly upload the file?

You don't.  Because of the way the XHR transport layer works, you can't
use it to send actual file data.  What you *can* do is have the upload
form POST to an iframe, and use a separate set of asynchronous requests
to monitor it's progress.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---