Page 2 of 3

Cant upload files with Upload plugin

Posted: Sun Feb 07, 2016 9:58 am
by Deon

Forget it. I will make another plan.


Cant upload files with Upload plugin

Posted: Sun Feb 07, 2016 6:15 pm
by leven.steve

The UploadAll function returns true (ie success is called) even if NO files were successfully uploaded.


Cant upload files with Upload plugin

Posted: Mon Feb 08, 2016 9:00 pm
by Serhii Kulibaba

Hello Steve,

Could you clarify, which function do you use?
Please use events "success" and "error" of the upload service to check it's result


Cant upload files with Upload plugin

Posted: Tue Feb 09, 2016 8:11 am
by leven.steve

In your example plugin (which you are "fixing") it is suggested elsewhere on this forum to use the Upload All button. This does work however your documentation states that you will get a Success response so long as one of the possible multiple files are uploaded.

What I have found is that if you add say 3 files to the list and then click Upload All and none of them get uploaded (maybe they have spaces in the name for example) then you still get a Success response so it calls your Success() function after the "post" function call. So it then says "Files uploaded succesfully".

I dont think I can explain it any better really...


Cant upload files with Upload plugin

Posted: Tue Feb 09, 2016 8:11 am
by leven.steve

Would you like to see the entire function code?


Cant upload files with Upload plugin

Posted: Fri Feb 12, 2016 9:54 am
by Evgene Karachevtsev

Hello Steven,

Sorry for the radio silence here. Sure, we would like to see it, could you please share it with us?


Cant upload files with Upload plugin

Posted: Fri Feb 12, 2016 12:27 pm
by leven.steve

I think I can clarify this. What I have discovered is that the upload function call
code Apperyio.get("FileDB__files_upload_service")(requestData).then(/code
always triggers the function(success) call back but the returned "success" variable will indicate whether an error occurred or not.
Image

Your sample code then says "All files has been successfully uploaded." without checking the error code!

What I was expecting is that the function(error) would trigger instead.

So if you are re-writing this sample you might want to amend it or at make that clear in the documentation for the plugin please.


Cant upload files with Upload plugin

Posted: Fri Feb 12, 2016 12:29 pm
by leven.steve

As an aside this, anyone who wants to use the code and work around the problem of spaces in the file name can use this line in the requestData mapping/setting code to replace all spaces with %20 or change the %20 to a dash or underline.
coderequestData.data = _.pluck($scope.files, 'filepointer');
for(var i=0;i<1;i++){requestData&#46;data&#46;name=requestData&#46;data&#46;name&#46;replace(/ /g,"%20");}/code


Cant upload files with Upload plugin

Posted: Fri Feb 12, 2016 2:08 pm
by Evgene Karachevtsev

Steve,

Thank you for the feedback, we'll forward this information to our development team.


Cant upload files with Upload plugin

Posted: Thu Mar 31, 2016 6:16 am
by ian H

Deon,

I have the same issue. Did you find a solution?

Best,

-I