Kah Wee
Posts: 0
Joined: Mon Feb 09, 2015 4:08 pm

Problem with image loading to Files collection

I have been following this tutorial: http://devcenter.appery.io/tutorials/...,

and I have hit an issue. I have selected 2 files to be uploaded into the Files collection, however, only 1 file was uploaded. (I selected the "multiple" button as well)

I tried the tutorial this morning but it worked fine, however it is not working now (I tried to apply this solution on top of the tutorial).

I tried to restart the tutorial from scratch again, but the file uploading problem seems to persist.

Appreciate your comments on this. Thank you.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Problem with image loading to Files collection

Hello Kah,

Could you please clarify, do you get any errors in a browser console?

Kah Wee
Posts: 0
Joined: Mon Feb 09, 2015 4:08 pm

Problem with image loading to Files collection

Hi Evgene,

No, there were no errors thrown on my browser. I retried the tutorial again (in a new app), and the multiple file upload worked fine.

However, what I did find out was the solution for this question (https://getsatisfaction.com/apperyio/...) does not work any more, especially this line of code (from Yurii):

for(var i = 0; i < data.length; i++){
//here you can use "data.success.filename" as you need.
alert("filename[" + i + "] = " + data.success.filename);
};

After I applied this code, I was unable to upload multiple images. Even after removing the code, the issue persists.

======
My eventual goal is to be able to use a unique identifier to link the Files collection and custom file details collection. Is there a better way to do this?

Thank you!

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Problem with image loading to Files collection

Hi Kah,

Tried that code:

pre

for(var i = 0; i < data&#46;length; i++){
&#47;&#47;here you can use "data&#46;success&#46;filename" as you need&#46;
alert("filename[" + i + "] = " + data&#46;success&#46;filename);
};

/pre

Works correctly.
Details about implementation: http://prntscr.com/639oqu/direct

Please open browser network tab and find upload request there and see all request parameters and response.

Regards.

Kah Wee
Posts: 0
Joined: Mon Feb 09, 2015 4:08 pm

Problem with image loading to Files collection

Hi Yurii,

Thank you. I managed to figure out the errors from browser network tab. The code works as expected.

Return to “Issues”