Page 2 of 2

Unable to upload image to custom collection

Posted: Thu Oct 02, 2014 7:51 am
by Graeme6630509

Hi Yurii,

It is the unique "file name" in the files collection that I am looking to get. I then have a file details collection where I will use the file name as a reference to the file.

Thanks,
Graeme


Unable to upload image to custom collection

Posted: Thu Oct 02, 2014 8:28 am
by Kateryna Grynko

Hi Graeme,

I am sorry, not sure I understand whether this is what you need. Please let us know if you need our help.


Unable to upload image to custom collection

Posted: Thu Oct 02, 2014 1:03 pm
by Graeme6630509

Hi Kateryna,

I am looking to store a file and some details about the file to the database. e.g. a profile photo(file), firstname, surname.

From what I am aware I have to store the file to the files collection.
I have also created a details collection to store the firstname and surname.

What I want to do is link the two collections via a unique identifier.

Is this possible or am I going about it the wrong way?

Thanks,
Graeme


Unable to upload image to custom collection

Posted: Thu Oct 02, 2014 10:37 pm
by Yurii Orishchuk

Hi Graeme,

Please follow these steps to get information about uploaded file:

1 Navigate to page "data" mode.

2 Add "success" event handler for your "upload" service datasource with action "Run JavaScript".

3 Populate it with following code: http://prntscr.com/4sijl2/direct

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

Regards.


Unable to upload image to custom collection

Posted: Fri Oct 03, 2014 11:20 pm
by Graeme6630509

Thanks Yurii,

Worked perfectly.

Thanks,
Graeme