Upload multiple files
- Single Page
Posted 23 January 2012 - 01:06 AM
I have question about something that I'm trying to do; I have a table with some text fields, but also I want to upload 1 or more files (images) related to that record and save that files names in other table. At this moment, if I want to upload more than 1 file, I have to add more fields to the table, and that's what I don't need.
I was wondering if is this possible to do. Or if there is another way to do it.
This is an example of what I'm trying to do:
[b]Table 1 (Content)[/b]
- Id_content
- Title
- Content
- Date
[b]Table 2 (images)[/b]
- id_file
- Id_content
- file_name
Thanks for you help.
Posted 23 January 2012 - 05:20 AM
Posted 11 February 2012 - 15:45 PM
if you don't want to code it yourself , you can use the "relation" to "link" the file_id from the tables, that way you can have multiple images in the second table related to single id from the first.
[/quote]
can you post an example?
Posted 11 February 2012 - 15:59 PM
Posted 11 February 2012 - 22:45 PM
well it's as simple as that http://www.grocerycr.../set_a_relation - just imagine that the employee's table is your table_1 and the offices is your table_2, and officeCode is your id_content
[/quote]
ok, but what if i need to insert into the second table?
Posted 12 February 2012 - 12:41 PM
For now you cannot add to the relation a new record straight away. This is a feature that I will try to have in future versions, as many users asked for (imagine a button "add +" at the right of the set_relation field). But even if I had this type of feature, you need actually a let's named it "photo gallery" CRUD that has this feature. Even if everything goes well, I think the customer don't like to have in table interface their images. So perhaps you have to create a custom photo gallery with an interface like this: [attachment=47:2012-02-12_123638.png]
This is just my opinion.
Posted 02 November 2012 - 08:13 AM
Posted 03 June 2014 - 10:54 AM
Posted 03 June 2014 - 15:21 PM
If you want to upload just file... u can use this /topic/1912-updated-30072013-multiple-uploading/
this is useful ...
u can alter the same for adding name / content as u wish to .. and get your solution served.
Hope this helps u
Happy GCing :)