File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ OC.FileUpload.prototype = {
214214 var file = this . getFile ( ) ;
215215
216216 if ( file . isDirectory ) {
217- return this . uploader . ensureFolderExists ( OC . joinPaths ( this . _targetFolder , file . name ) ) ;
217+ return this . uploader . ensureFolderExists ( OC . joinPaths ( this . _targetFolder , file . fullPath ) ) ;
218218 }
219219
220220 // it was a folder upload, so make sure the parent directory exists already
@@ -226,7 +226,6 @@ OC.FileUpload.prototype = {
226226 folderPromise = $ . Deferred ( ) . resolve ( ) . promise ( ) ;
227227 }
228228
229- console . log ( "LOL" ) ;
230229 if ( this . uploader . url ) {
231230 if ( _ . isFunction ( this . uploader . url ) ) {
232231 this . data . url = this . uploader . url ( this . getFileName ( ) , this . getFullPath ( ) ) ;
@@ -596,8 +595,6 @@ OC.Uploader.prototype = _.extend({
596595 * were created
597596 */
598597 ensureFolderExists : function ( fullPath ) {
599- console . log ( "!!!" ) ;
600- console . log ( fullPath ) ;
601598 if ( ! fullPath || fullPath === '/' ) {
602599 return $ . Deferred ( ) . resolve ( ) . promise ( ) ;
603600 }
@@ -627,9 +624,7 @@ OC.Uploader.prototype = _.extend({
627624 parentPromise = this . ensureFolderExists ( parentPath ) ;
628625 }
629626
630- console . log ( fullPath ) ;
631627 parentPromise . then ( function ( ) {
632- console . log ( "====?" ) ;
633628 self . filesClient . createDirectory ( fullPath ) . always ( function ( status ) {
634629 // 405 is expected if the folder already exists
635630 if ( ( status >= 200 && status < 300 ) || status === 405 ) {
Original file line number Diff line number Diff line change 10791079 } else {
10801080 paramNameSet = paramName ;
10811081 }
1082- data . originalFiles = files ;
1082+
1083+ data . originalFiles = [ ] ;
1084+ $ . each ( files , function ( file ) {
1085+ if ( ! file . isDirectory ) {
1086+ data . originalFiles . push ( file ) ;
1087+ }
1088+ } ) ;
1089+
10831090 $ . each ( fileSet || files , function ( index , element ) {
10841091 var newData = $ . extend ( { } , data ) ;
10851092 newData . files = fileSet ? element : [ element ] ;
You can’t perform that action at this time.
0 commit comments