Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Danial Farid authored and Danial Farid committed Sep 11, 2015
1 parent 45cc156 commit 9eb5301
Show file tree
Hide file tree
Showing 24 changed files with 120 additions and 120 deletions.
Binary file modified demo/src/main/webapp/js/FileAPI.flash.swf
Binary file not shown.
50 changes: 25 additions & 25 deletions demo/src/main/webapp/js/FileAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -3374,6 +3374,31 @@
_fn: {},


/**
* Publish flash-object
*
* @param {HTMLElement} el
* @param {String} id
* @param {Object} [opts]
*/
publish: function (el, id, opts){
opts = opts || {};
el.innerHTML = _makeFlashHTML({
id: id
, src: _getUrl(api.flashUrl, 'r=' + api.version)
// , src: _getUrl('http://v.demidov.boom.corp.mail.ru/uploaderfileapi/FlashFileAPI.swf?1')
, wmode: opts.camera ? '' : 'transparent'
, flashvars: 'callback=' + (opts.onEvent || 'FileAPI.Flash.onEvent')
+ '&flashId='+ id
+ '&storeKey='+ navigator.userAgent.match(/\d/ig).join('') +'_'+ api.version
+ (flash.isReady || (api.pingUrl ? '&ping='+api.pingUrl : ''))
+ '&timeout='+api.flashAbortTimeout
+ (opts.camera ? '&useCamera=' + _getUrl(api.flashWebcamUrl) : '')
+ '&debug='+(api.debug?"1":"")
}, opts);
},


/**
* Initialization & preload flash object
*/
Expand Down Expand Up @@ -3413,31 +3438,6 @@
},


/**
* Publish flash-object
*
* @param {HTMLElement} el
* @param {String} id
* @param {Object} [opts]
*/
publish: function (el, id, opts){
opts = opts || {};
el.innerHTML = _makeFlashHTML({
id: id
, src: _getUrl(api.flashUrl, 'r=' + api.version)
// , src: _getUrl('http://v.demidov.boom.corp.mail.ru/uploaderfileapi/FlashFileAPI.swf?1')
, wmode: opts.camera ? '' : 'transparent'
, flashvars: 'callback=' + (opts.onEvent || 'FileAPI.Flash.onEvent')
+ '&flashId='+ id
+ '&storeKey='+ navigator.userAgent.match(/\d/ig).join('') +'_'+ api.version
+ (flash.isReady || (api.pingUrl ? '&ping='+api.pingUrl : ''))
+ '&timeout='+api.flashAbortTimeout
+ (opts.camera ? '&useCamera=' + _getUrl(api.flashWebcamUrl) : '')
+ '&debug='+(api.debug?"1":"")
}, opts);
},


ready: function (){
api.log('FlashAPI.state: ready');

Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/webapp/js/FileAPI.min.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions demo/src/main/webapp/js/ng-file-upload-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS file upload/drop directive and service with progress and abort
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <[email protected]>
* @version 7.0.17
* @version 7.1.0
*/

(function () {
Expand Down Expand Up @@ -288,7 +288,7 @@
}

if (FileAPI.staticPath == null) FileAPI.staticPath = basePath;
script.setAttribute('src', jsUrl || basePath + 'FileAPI.min.js');
script.setAttribute('src', jsUrl || basePath + 'FileAPI.js');
document.getElementsByTagName('head')[0].appendChild(script);

FileAPI.hasFlash = hasFlash();
Expand Down Expand Up @@ -422,7 +422,7 @@ if (!window.FileReader) {
/**!
* AngularJS file upload/drop directive and service with progress and abort
* @author Danial <[email protected]>
* @version 7.0.17
* @version 7.1.0
*/

if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
Expand All @@ -443,7 +443,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {

var ngFileUpload = angular.module('ngFileUpload', []);

ngFileUpload.version = '7.0.17';
ngFileUpload.version = '7.1.0';

ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
function sendHttp(config) {
Expand Down Expand Up @@ -1037,9 +1037,9 @@ ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http,
var disallowObjectUrl = Upload.attrGetter('ngfNoObjectUrl', attr, scope);
Upload.dataUrl(file, disallowObjectUrl)['finally'](function () {
$timeout(function () {
if ((disallowObjectUrl && file.dataUrl) || (!disallowObjectUrl && file.blobUrl)) {
if (file.blobUrl || file.dataUrl) {
elem.removeClass('ngf-hide');
elem.attr('src', disallowObjectUrl ? file.dataUrl : file.blobUrl);
elem.attr('src', (disallowObjectUrl ? file.dataUrl : file.blobUrl) || file.dataUrl);
} else {
elem.addClass('ngf-hide');
}
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/webapp/js/ng-file-upload-all.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions demo/src/main/webapp/js/ng-file-upload-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS file upload/drop directive and service with progress and abort
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <[email protected]>
* @version 7.0.17
* @version 7.1.0
*/

(function () {
Expand Down Expand Up @@ -288,7 +288,7 @@
}

if (FileAPI.staticPath == null) FileAPI.staticPath = basePath;
script.setAttribute('src', jsUrl || basePath + 'FileAPI.min.js');
script.setAttribute('src', jsUrl || basePath + 'FileAPI.js');
document.getElementsByTagName('head')[0].appendChild(script);

FileAPI.hasFlash = hasFlash();
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/webapp/js/ng-file-upload-shim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9eb5301

Please sign in to comment.