I am attempting to use the new Application Data folder in the Drive SDK, but rather than creating a new file as the sample code shows, I wish to create a copy of a template file which the user selects. My template files are Google-editable spreadsheets held within a specific Drive account and are world-readable, with their IDs configured in my application.
I first tried the copy by specifying appdata
as a parent ID in the body of the copy request, as follows
{
"title": "New file",
"parents":
[
{
"id": "appdata"
}
]
}
this produced a 403 error with the text
Only folders or files with content stored in Drive are allowed within the appdata folder
So I tried adding root
as a second parent in the parents
array, as follows
{
"title": "New file",
"parents":
[
{
"id": "appdata"
},
{
"id": "root"
}
]
}
This fails again with a 403, but a slightly different error
Method not supported for appdata contents
I have also tried updating the parents
property of the new file after creation, and by inserting a new value into the parents entity of the newly-created file, both of which yield the same 'Method not supported' error.
So my question is, is it possible to create a copy of an existing field held in Drive, within a user's appdata folder? The fact that this consistently fails suggests not and that I may have to use the user's normal storage, but I would like to use the appdata folder if possible to separate my app's content from their general Drive files.
Actually, unfortunately you cannot currently place a realtime file within the appdata folder. This is something we are looking at adding, but in most cases it doesn't make sense since the content of the appdata folder is restricted to a single user.
Cheryl Simon on Google Drive Developers - https://plus.google.com/communities/107264319205603895037
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With