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.
Thank you for your answer.
Can you tell me when update with this issue fix will be released?
Hi Pavel,
The engineering team is currently working on the problem. We do not have to ETA yet but we will let you know as soon as we have an update for you.
Regards,
Abhijeet
NOTE: BACK-2726
Hi Pavel,
The issue you are describing indicates that the metadata for the file is created in Kinvey but the actual file is not successfully uploaded to Google Cloud Storage.
Please try the following:
camera.requestPermissions(); camera.takePicture() .then(function (imageAsset) { console.log("Result is an image asset instance"); console.dir(imageAsset); console.log('Uploading image'); var filePath = imageAsset.android; console.log('exists: ' + fs.File.exists(filePath)); var imageFile = fs.File.fromPath(filePath); console.dir(imageFile); var fileContent = imageFile.readSync(); var metadataTrue = { filename: imageFile.name, mimeType: 'image/jpeg', size: fileContent.length, public: true } Kinvey.Files.upload(imageFile, metadataTrue) .then(function (file) { console.log('File uploaded'); console.log(JSON.stringify(file)); }) .catch(function (error) { console.log('Upload error: ' + error.message); }); }).catch(function (err) { console.log("Error -> " + err.message); });
Let me know if this has fixed the issue or if the problem persists.
Regards,
Martin
NOTE: BACK-2726 (current), WEBCLI-2180 (renamed)
Hi Martin!
I've updated Kinvey to 3.7.2 and changed code as you provided in your post. Looks like it doesn't fix the issue.
The code in upload Promise (then&catch) is not executed, I don't see any console.log messages from then or catch blocks. But file appears in Kinvey console. Anyway it is not available for downloading both through console and code.
The error message is the same:
<?xml version='1.0' encoding='UTF-8'?>
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>Anonymous users does not have storage.objects.get access to object f15cfab1f6fc4735baddb9aa0d56c64a/d58fdd4d-4fc0-40d1-b611-d8c0f1c781fb/NSIMG_20170803_82145.jpg.</Details>
</Error>
Hi Pavel,
I am sorry to hear the problem persists.
I am attaching a very simple project for you to try and test image uploading. Please change the following 4 variables to test the project on your side in main-page.js (appKey, appSecret, username, password):
Kinvey.init({ appKey: 'your-app-key-here', appSecret: 'your-app-sercret-here' }); const activeUser = Kinvey.User.getActiveUser(); if (!activeUser) { Kinvey.User.login('your-username', 'your-password'); }
Furthermore, I would like to add some additional explanation of the File upload process - the Uploading to Kinvey is a two-step process as noted in the documentation. The process consists of:
Martin,
HelloWorld.zip works fine with uploading files and it looks like problem is on my side somewhere else.
Thank you for your help!
Pavel Sukhodoev
Hello!
I'm making app in NativeScript (JavaScript) with Kinvey backend. Everything works fine except uploading image file (camera module) to Kinvey (Google Cloud Storage).
The code I'm uploading file with is:
Reading file as string is the only way it is able to upload.
While uploading I'm getting error, but file is displayed in Kinvey console with its size. When I click this file in console as well as try to get this file with code I'm getting error:
<Error>
<Message>Access denied.</Message>
Anonymous users does not have storage.objects.get access to object 6d70d80512b04924a8157d2845123a81/06ceab9e-457b-4964-8bb3-40ab8e5ba14a/12222.jpg.
</Details>
</Error>
Can you help me and explain what I'm doing wrong?