User images not saved

When end user upload profile photos/images it is not properly saved into user table.
When try to see uploaded photos in database it is showing blank.
Example user object IDs:
A0462B1C-F6F8-4D37-A4BA-785927D8EB22
FE388642-6656-4964-80E7-985B9DB73701
Note: We have not released any new android/ios build on production since last 4 months
. We are sure it was working 3 months before.


Screenshot 2023-01-04 at 6.10.11 PM

Hello @Ayaz_Khan,

Does your problem only occur with the users you specified?
This behavior may indicate that the file does not exist or that the file path is incorrect. Verify that the file path is correct and that the file exists.

If the problem persists, please provide more detailed steps to reproduce the issue.

Regards
Nazar

Hello Nazar,

Please see my answer below to each your questions:

Does your problem only occur with the users you specified?
Ayaz Answer: No, This problem occurs for all users.
including any old or new registered users.

This behaviour may indicate that the file does not exist or that the file path is incorrect. Verify that the file path is correct and that the file exists.
Ayaz Answer: As I told to you this was working earlier but currently whenever user upload photos on backendless site it is creating folder instead of image file.

If the problem persists, please provide more detailed steps to reproduce the issue.
Ayaz Answer: Can you please download app from Apple store using below link and create and profile and try to upload your good picture.

Thanks Regards
Ayaz

hello @Ayaz_Khan

Can you please download app from Apple store using below link and create and profile and try to upload your good picture.

No, because it does not help us to understand the problem. It will be greater if you provide a small piece of code or some cUrl(s) that demonstrate the issue.

Please see the screenshot which we sent very first in this thread.
When we try to see uploaded images in backendless it is showing a folder structure instead of .jpg file,
As I told to you, Our Mobile app was working 4 months ago and after this, we did not send any new builds to the store.
This issue can only be tested using the mobile app.
Please help me to resolve this issue.

1 Like

Please help me to resolve this issue.

We will be happy to assist you. But as I sed, we need steps to reproduce, so we can understand the problem better.

Please see the screenshot which we sent very first in this thread.

The screenshot does not help to reproduce the issue.

As I told to you, Our Mobile app was working 4 months ago and after this, we did not send any new builds to the store.

I have understood it pretty clearly. But still, without steps to reproduce, I can’t help you.

This issue can only be tested using the mobile app.

Even if I install the app from the store I will not be able to understand the issue, because I do not see the code.

The only way I can reproduce some thing simular is to add / at the end of file for example:

curl -X POST 'https://api.backendless.com/23298D6F-EA2F-7BE6-FFBF-7507875E1E00/<api-key>/files/test/a11_my.png/' \
--form '=@"/Users/ksv510/Downloads/my.png"'

But if I send the request as the following( without \):

curl -X POST 'https://api.backendless.com/23298D6F-EA2F-7BE6-FFBF-7507875E1E00/<api-key>/files/test/a11_my.png' \
--form '=@"/Users/ksv510/Downloads/my.png"'

Everything is fine.

So my question is how do you call the server to upload the file?

You can see below URls’

Working:

NOT Working:
https://backendlessappcontent.com/C3B46A6B-6793-4561-9033-3845A19EC182/27B03E79-A628-4F5F-9A8C-62C08018BBDA/files/user-photos/638/0CC02274-0D3B-4A1E-B923-34440675B4EC.jpg

Even the user uploaded an image from his mobile app and it was stored into backendless but now it is not showing the image.
it is creating a directory with the name “0CC02274-0D3B-4A1E-B923-34440675B4EC.jpg” instead of creating an image.

@Ayaz_Khan

because 0CC02274-0D3B-4A1E-B923-34440675B4EC.jpg is a folder. That is why I ask you how do you upload the file?

As you know the system is creating a folder instead of creating a file for each jpg image upload. We want to understand what exactly changes have been made at your end which stopped working our code. As it was working earlier.

Please see our code screen shot which is used to upload image.

hello @Ayaz_Khan

As you can see you have / at the end


It is incorrect because folders end with /.

To fix the issue you should remove / before ?

We want to understand what exactly changes

We have added API that creates folders, in case the path ends with / backendless creates a folder.

@sergey.kuk , We removed “/” and try but still facing same issue.


Thanks

As I see you photos are fine now Backendless, or there is some other application where I can see the issue?

we have pozeDevelopment, pozeStaging, Poze are the app names

@Ayaz_Khan

so it still doesn’t work for you?

yes its not working

It means you still have code that adds slash at the end

Thanks
We checked our code, There were a few more palaces where we should have to update our code.
We have done it now, and It is working fine.
Thanks Again
Ayaz