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
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
Hi Graeme,
I am sorry, not sure I understand whether this is what you need. Please let us know if you need our help.
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
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.length; i++){
//here you can use "data.success.filename" as you need.
alert("filename[" + i + "] = " + data.success.filename);
};
/pre
Regards.
Thanks Yurii,
Worked perfectly.
Thanks,
Graeme