Nested items #124
-
Hello, My caseHere is my case. I'm basically trying to build simple version of iCloud. Here are examples responses {
"data": [
{
"id": "1dd379dd-e9f1-49d5-8d57-01c2f231fd5d",
"type": "FILE",
"filename": "3.PNG",
"preview": "{{ preview_url }}",
"uploadUrl": "{{ upload_url }}"
},
{
"id": "613d1e22-f82a-49b7-86c1-05e1ff4fc44a",
"type": "FILE",
"filename": "31.PNG",
"preview": "{{ preview_url }}",
"uploadUrl": "{{ upload_url }}"
},
{
"id": "7e4edba5-9644-4e7e-b991-3b5d4ac53b8f", <--- subDirectory
"type": "DIRECTORY",
"filename": "my directory"
}
]
} GET request subdirectory
{
"data": [
{
"id": "0966c025-2894-4d33-849f-e5aae9abedf1",
"type": "FILE",
"filename": "MY MOVIE.MP4",
"preview": "{{ preview_url }}",
"uploadUrl": "{{ upload_url }}"
},
{
"id": "31ebc4c8-105b-422e-a106-0b14fcb4db67",
"type": "FILE",
"filename": "MY CODE.ZIP",
"preview": "{{ preview_url }}",
"uploadUrl": "{{ upload_url }}"
},
{
"id": "117f89da-1929-48ea-985b-d8384724b9b7",
"type": "DIRECTORY",
"filename": "another directory"
},
{
"id": "c8c191b9-4c78-407d-b826-f07550357415",
"type": "DIRECTORY",
"filename": "my vocation"
}
]
} My QuestionsI read about relationships
Question 1.If removing a relationship does not delete its linked resources what can I do? For now I see one solution. Which is to loop through post.comments and delete each comment. But I'm not sure what will happen inside Also wondering what will do flutter_data when I will move multiplie files to another sub directory? My final thoughs
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's definitely possible. Deleting can be done as you describe. Moving is simply using relationships to link to another resource. Tree-like structures are also possible. There are tests showing all of these capabilities. |
Beta Was this translation helpful? Give feedback.
It's definitely possible. Deleting can be done as you describe. Moving is simply using relationships to link to another resource. Tree-like structures are also possible. There are tests showing all of these capabilities.