blueimp

A Simple Uploader using AngularJs (with CORS Implementation)

不羁的心 提交于 2019-12-02 09:29:10
Recently, I had to write a simple uploader (reusable) using AngularJs, while, keeping my API in separate place and finally wrote one using blueimp jQuery File Uploader and made lil customizing it. I Thought it might be great to share this and hopefully improve myself in learning in AngularJs. (I've added the answer) http://codelikeapoem.com/2013/05/angularjs-tutorial-4-file-upload-using.html (You can download the entire code their) App.Coffee @angTut = angular.module("angTut", ['LocalStorageModule', 'ngResource', 'uploaderComponent']); @angTut.constant('uploadServiceUrl', 'http://192.168.0.2

adding the uploaded file name to database in blueimp fileupload jquery plugin

◇◆丶佛笑我妖孽 提交于 2019-12-02 05:28:12
问题 I am hoping someone has some experience with the blueimp fileupload jquery plugin at : https://github.com/blueimp/jQuery-File-Upload How to add the uploaded file name to database ? 回答1: In the options array (look for $this->options = array( ) and insert 'database' => 'database_name', 'host' => 'localhost', 'username' => 'user', 'password' => 'password', Then after protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) { $file =

adding the uploaded file name to database in blueimp fileupload jquery plugin

眉间皱痕 提交于 2019-12-01 23:01:55
I am hoping someone has some experience with the blueimp fileupload jquery plugin at : https://github.com/blueimp/jQuery-File-Upload How to add the uploaded file name to database ? In the options array (look for $this->options = array( ) and insert 'database' => 'database_name', 'host' => 'localhost', 'username' => 'user', 'password' => 'password', Then after protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) { $file = new stdClass(); $file->name = $this->get_file_name($name, $type, $index, $content_range); $file->size =

Finish of Multiple file upload

可紊 提交于 2019-12-01 15:57:27
I have a question about the use of Blueimp jQuery-File-Upload plugin ( https://github.com/blueimp/jQuery-File-Upload ) There is a callback function or an alternative method, to know when is finished an upload of multiple files? I do not want to know when is finished the upload of every single file, but when is finished the entire process (All Uploads Complited). There is also the opportunity to know how many files have actually been loaded and how many they were requested? Please have a look at the "stop" callback option: .bind('fileuploadstop', function (e) {/* ... */}) And If you want to

requirejs blueimp fileuploader only loads min.js files and none other

纵饮孤独 提交于 2019-12-01 01:13:05
so I'm a noobie to requirejs and backbone, but I'm trying to load in all the dependencies for blueimp file uploader on my local machine and not load any external scripts. here is my config.js file: // Set the require.js configuration for your application. require.config({ // Initialize the application with the main application file. deps: ["main"], paths: { // JavaScript folders. libs: "../assets/js/libs", plugins: "../assets/js/plugins", vendor: "../assets/vendor", api : "../assets/js/libs/api", // Libraries. jquery: "../assets/js/libs/jquery", jqueryui: "../assets/js/libs/jquery-ui", lodash:

Add more custom variables to mysql insert on blueimp/jquery-file-upload

主宰稳场 提交于 2019-12-01 01:06:27
I am currently inserting a title and description, via mysql, inside of the blueimp/jquery-file-upload script. I used this tutorial to get me there, however, i need to add another variable. The variable is the session of the current logged in user's ID $_SESSION["userid"] , and i want to insert it into a column i added called uid . Usually it's simple to impliment another column into the insert, however this script is very touchy and anytime i mess with it, even the slightest bit, i get " SyntaxError: Unexpected token < ". Any help would be greatly appreciated. /server/php/index.php $options =

Adding descriptions inside a blueimp gallery

爷,独闯天下 提交于 2019-12-01 00:52:04
问题 I am using a BlueImp Gallery to add lightboxes to my image gallery. So, when you click on an image thumbnail, it launches a lightbox with a larger version of the image etc. I also want to add in some descriptive text and a button to each slide of the lightbox, but I am having trouble making it work. It won't show the placeholder descriptions that I have added in. Here's what I have so far; HTML: <div id="blueimp-gallery" class="blueimp-gallery"> <!-- The container for the modal slides -->

Why Blueimp's JQuery File Upload add all prev. selected files even if options [replaceFileInput: false] and [maxNumberOfFiles: 1] are set on init?

自闭症网瘾萝莉.ら 提交于 2019-11-30 20:34:47
I have just normal form with some input fields and one file input field. I use the Blueimp's Jquery File Upload plugin to upload a file. It seems to work, if you select a file and after that click the upload button. But if you reselect files to upload, it saves all the prehistory of selections and after upload sends all the XHRs to the server. I want to upload only one currently selected file, not all the previously selected files (in file open dialog). Here is my js module to handle the upload: $(function () { $('#upload_form').fileupload({ dataType: 'json', autoUpload: false, fileInput: '

Blueimp jQuery File Upload plugin - “Empty file upload” result PHP

99封情书 提交于 2019-11-30 18:47:33
Here's the plugin: https://github.com/blueimp/jQuery-File-Upload I'm having a problem getting the response I want from the plugin after uploading a file. On the page with the plugin, I have the following $('#fileupload').fileupload( 'option', { 'maxNumberOfFiles' :1, 'url' : '/admin/upload_handler.php' } ); In upload_handler.php I successfully retrieve the uploaded files from $_FILES and do stuff, then send a response back in JSON. I've confirmed using Firebug that the response is in the proper format: [ { "url" : "image_url", "thumbnail_url" : "image_th_url", "delete_url" : "test", "delete

How to resize images client side using jquery file upload

房东的猫 提交于 2019-11-30 16:35:59
I am using blueimp jquery-file-upload in a Rails 3.2 app, via the jquery-fileupload-rails gem. I am trying to resize images on the client side prior to uploading, but am having trouble following the documentation. My code is below. Currently uploading works perfectly, but the images are not resized. What is the correct syntax to resize images via jquery-file-upload. (Two approaches shown in the coffeescript based on this and this documentation. Neither works for me.) #Coffeescript jQuery -> if $("#new_asset").length $("#new_asset").fileupload dataType: "script" add: (e, data) -> types = /(\.|\