tinode / ios

Tinodios: Tinode Messaging Client for iOS
Apache License 2.0
241 stars 104 forks source link

Picture directly from camera does not upload #175

Closed young310 closed 2 years ago

young310 commented 3 years ago

Describe the bug Press the add button -> choose image -> take photo ->empty image caption -> use photo -> image will not upload

To Reproduce Steps to reproduce the behavior:

  1. Go to chat with someone
  2. Press the add button
  3. choose image
  4. take photo
  5. empty image caption
  6. use photo
  7. image will not upload

Expected behavior

  1. Image should upload, but nothing happens
  2. if you choose "Camera roll" will work as expected

Tinodios (please complete the following information):

Server

Additional context 2021-08-25 01:48:22.484798+0800 Tinodios[1297:270885] Keyboard cannot present view controllers (attempted to present <UIAlertController: 0x106864800>) 2021-08-25 01:48:29.176672+0800 Tinodios[1297:270885] [Camera] Failed to read exposureBiasesByMode dictionary: Error Domain=NSCocoaErrorDomain Code=4864 " -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL" UserInfo={NSDebugDescription= -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL} Elvvvis %b false image size: 282620, max inband size: 195584

aforge commented 2 years ago

This should fix it: https://github.com/tinode/ios/commit/0b40b78f34c02aa3c8a93e2f230634d144985a60

young310 commented 2 years ago

@aforge I confirm the upload issue have been solved using 0b40b78. But the image preview become weird after uploading the pictur IMG_4042 e.

aforge commented 2 years ago

@young310 Are you synched to devel@HEAD? I've pushed a few more commits recently. https://github.com/tinode/ios/commit/19ab716382b1052cd481d6600595f468eef06568 should take care of previews.

young310 commented 2 years ago

@aforge I currently use "master", and manually patch the file ImagePreviewController.swfit but with the same result. I will try to rebuild the app using devel@HEAD IMG_4044 IMG_4045 .

young310 commented 2 years ago

confirm problem solved in 0b40b78