I am trying to integrate new valum ajax upload with codeigniter 2.
However the new valum ajax upload is using $_GET to sent file name, while codeigniter 2 upload library always check fileupload using $_FILES.
How do i make it works with each other,
Thank you in advance
Extended upload library. Create MY_upload.php file in your library and make your own function like do_upload(). For example do_Vupload(). And put valum codes inside it or load as another library or include it. There you have own upload method. And use it
$this->upload->do_Vupload();
Related
I'm using dropzone.js for file uploading.
I want to know how to fire a file upload via dropzone.js API ... I mean without dragging or input but calling a function passing file path?
What's your use case? Why not just use something that will directly talk to your backend file processing?
I'm making front-end profiler in WordPress. I want to upload user photo from front-end. My entire profile is on WordPress ajax. I simply want to upload photo to wp-content/uploads/.. but from front using ajax. I want two things:
1) Media hook
2) File to post through ajax
Can anyone help me a little. I'm really stuck in this place.
First:
For Wordpress new Media Uploader you should look to this tutorial.
Second:
To handle file uploads in Wordpress, you can use the function wp_handle_upload
Note:
You can use Form Data API to upload files with ajax but it may not work with older browsers. Instead you can do file uploads with iframe.
I want to submit form using ajax.but the problem is that ,i found ajax doesn't support file upload while we submit form.Is there any other way we can do it using ajax because i don't want to refresh page using normal form submit.Please help any suggestion will be very helpful for me.
thanks in advance
You can do this in several ways:
First:
Use canvas
How to save a HTML5 Canvas as Image on a server
Second:
Use some js library like:
http://blueimp.github.io/jQuery-File-Upload/ or
https://github.com/LPology/Simple-Ajax-Uploader
Third:
Use html5 FormData
How to upload a file using jQuery.ajax and FormData
I've been trying to use the webimage helper in webmatrix to upload an image using ajax but its not clear to me how i can pass data to the webimage.getImageRequest("Image") method from the ajax post.This helper seems to retrieve its file upload data from the browser when the page form is posted.For me, i dont want to refresh the form...I just want ajax to handle process
The issue here isn't the WebHelper - uploaded files are not posted with ajax requests:
How can I upload files asynchronously?
So you're probably getting a file name, but no content. That thread above shows a few work arounds that should work fine with the WebHelper. I've also had pretty good luck with uploadify:
http://www.uploadify.com/
Happy Coding!
Jsonp can be used to fetch data from supporting services but can i use it to upload images. As far as i understand javascript cannot access your file system making it impossible to upload an image using pure javascript techniques.However is there a work around. Can an image be uploaded to a server using jsonp?
I don't think you can just using json. The closest you can get is posting to a seperate iframe. Jquery has a feature where you can post a form to a hidden iframe.
http://aspzone.com/tech/jquery-file-upload-in-asp-net-mvc-without-using-flash/
If you are using jquery: http://plugins.jquery.com/plugin-tags/ajax-upload