Start a new topic
Answered

Image upload fails

I click on upload file button in Files section on developer platform and select a file(larger than 1.5 mb), then the upload process always fails. Screenshot attached. Is there any size limitation for uploading file in free edition? I am able to upload small images though. Even if the upload fails for a file, I can see the file is there in Files section. If I click download url, it shows me error message - AccessDeniedAccess denied.
Anonymous caller does not have storage.objects.get access to 304d20137b1e420f872ede960f001476/7e1449db-52a4-40ae-a7b7-409fc6b566ef/jungle.jpg.
I tried uploading it multiple times but no luck. May be I am missing something?

Best Answer

Hi Sunita,


Kinvey does not directly serve or accept files. Instead, the Kinvey Files API works by providing a short-lived URL to a third-party cloud storage service from which file(s) can be uploaded or downloaded.  Currently, the third-party service used is Google Cloud Storage. So, Kinvey only stores the metadata of the files being uploaded and the actual file is stored on GCS. That's the reason you are seeing an entry in the Files collection even after a failed file upload. The file is not uploaded to the GCS. Please review this link for more information about File operations.


There is no such limitation of 1.5 MB for the free plan. I have tested  your use-case and I am able to upload images larger than 2 MB. I would request you to 'Clear Browsing Data' for your browser and try uploading  the file again. You can also try different browsers and check if you see  similar behavior. Please review the request-response in the browser's developer tools so that you get more information if the request fails.


Thanks,

Pranav

Kinvey


Answer

Hi Sunita,


Kinvey does not directly serve or accept files. Instead, the Kinvey Files API works by providing a short-lived URL to a third-party cloud storage service from which file(s) can be uploaded or downloaded.  Currently, the third-party service used is Google Cloud Storage. So, Kinvey only stores the metadata of the files being uploaded and the actual file is stored on GCS. That's the reason you are seeing an entry in the Files collection even after a failed file upload. The file is not uploaded to the GCS. Please review this link for more information about File operations.


There is no such limitation of 1.5 MB for the free plan. I have tested  your use-case and I am able to upload images larger than 2 MB. I would request you to 'Clear Browsing Data' for your browser and try uploading  the file again. You can also try different browsers and check if you see  similar behavior. Please review the request-response in the browser's developer tools so that you get more information if the request fails.


Thanks,

Pranav

Kinvey

Yes you are correct. There was something wrong with the browser cache. I cleared it all and the file was uploaded to development platform. Thank you for your quick and informative answer.

Login or Signup to post a comment