As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Can we modify the metadata of an image, uploaded using KCSLinkedAppdataStore, in BL?
Y
Yonghui Xiao
started a topic
over 9 years ago
1. to access the file collection, what is the "collectionName" in modules.collectionAccess.collection("collectionName")?
2. I think we can find a file by modules.collectionAccess.collection("collectionName").find( ) functon, right? How to find the file if we know the file name?
3. How to modify the access right in backend? {$set:{KCSFilePublic:@{YES}}} does not work.
It is too tricky to be feasible. So what I wanted to do is to set a user-uploaded image to be publicly accessible. At first I thought theoretically we should be able to access the metadata of the image file, then change the metadata to be "gr=true" so that it is globally readable. But it turned out:
1. We can set the entity containing the link of the image in data collection to be public. But it does not mean the file is public.
2. We cannot access the metadata of a file in BL. Or, all the methods of online documentation do not show how to modify the metadata of a file, which actually is stored in google's cloud server.
In summary there is no easy way to resolve this issue so far. Actually since I do not want to use FileStore to manipulate files, which is indeed a lame method, I have not resolved this now.
I hope Kinvey can provide file-options in KCSLinkedAppdataStore in the next release. It is really very easy for Kinvey to achieve this. But is very cumbersome for programmers to do it.
Thanks.
M
Michael
said
over 9 years ago
Have you been able to resolve this? What specific issue are you currently having? What code are you currently using to manipulate _blob? It is possible to change some of the metadata, but it's tricky because of the underlying CDN integrations.
Y
Yonghui Xiao
said
over 9 years ago
Now the URL method to fetch a photo does not work neither because of the newly enforced signature check as follows.
The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.
Y
Yonghui Xiao
said
over 9 years ago
I don't think BL supports file manipulation after I verified that for other Data collections BL works well.
Yonghui Xiao
2. I think we can find a file by modules.collectionAccess.collection("collectionName").find( ) functon, right? How to find the file if we know the file name?
3. How to modify the access right in backend? {$set:{KCSFilePublic:@{YES}}} does not work.