iOS upload to nextcloud Webapps automatically converts to jpeg

Hi,

I want users to upload to a share directly from their iPhone. once they click the share link they can choose add document. iOS/Safari asks for the source and offers the photo library. Upload works well. HOWEVER all photos are uploaded as jpeg even though the photos in the library are HEIC.

Is this some iOS magic I have not found or is the Webapps forcing Safari to do so?

Regards

2 Likes

Most likely you’ve used the wrong key words for your search :wink:

I am aware of that and it is NOT what I want. I want to use HEIC on the iPhone. And if I choose an upload from my iPhone towards a share in nextcloud I would expect that the iOS safari uploads HEIC and not JPG. However something either on the iOS side or (more likely) on the Webapps side of nextcloud seems to force JPG transformation and upload.

maybe the supported formats tag do not include HEIC and iOS is obeying this…

1 Like

In the provided article all steps are documented how to switch the default file format from HEIC to JPG from which can be derived how this can be reverted too. Am I wrong?

For sure it is. But it is not related to my question.

My iPhone is set to HEIC. I want to have HEIC. Why should I want to change this setting to JPEG? Why should I change it back to HEIC since it already IS at HEIC?

The point is that I have HEIC photos in the library, I open a Nextcloud Share in the iPhone browser, hit upload and choose these HEIC photos in my library. And instead of the HEIC version of the file being uploaded, something forces my iPhone to on the fly convert the picture to JPEG and upload a JPEG version to nextcloud. That is what I complain about. I want it to upload the non-converted HEIC versions of my photo library instead.

If you believe this is in any way related to your answer then I indeed fail to see this relation. It looks as if you misread my problem…

I found this thread und looked into my own Nextcloud. My iPhone is set to use heic, I have auto upload on, an all my photos in Nextcloud are jpg instead of heic. So
it seems to be a problem with the Nextcloud iOS app or with iOS itself.
I guess it’s the later one - if I open a photo on the iPhone with Readlle Documents or just share that photo from iOS gallery to phone data storage it ends up as jpg. So the problem of automatic conversion seems to be part of iOS share functionality, not of the Nextcloud app. (But maybe someone should test that cause my iPhone is running the actual public beta of the upcoming iOS version.)

Addition: tested that with other apps.
First: Heic seems only be available for rear camera, pictures taken with selfie front camera seem to be always jpg.
Second: a manual upload to Microsoft OneDrive gave me a heic photo in heic format one OneDrive.
Third: a upload to nextcloud (same photo!) was show as img_010.heic in the waiting list and changed to img_010.jpg when the upload to nextcloud for that file started.

So the whole thing is somehow strange… Maybe MS zse another api or has some special relation to cupertino?!?

Just tried it with OneDrive-App: If I hit upload picture and make a new picture it will reach OneDrive as jpeg. If I upload a HEIC picture from the photo library it is uploaded as heic. So apps DO have access to the HEIC information.

I then tried with the OneDrive-Webapp and everything I upload from the iPhone is uploaded as jpg instead of HEIC (just like with nextcloud) which means that maybe iOS Safari or iOS Photo Library has the builtin mechanism to on the fly convert to jpg for webbed uploads for whatever reason…

@j.koopmann Same question here.

I just got a new iPhone 12 running iOS 14. I noticed this default format in Camera settings. Honestly, I had never heard of HEIC/HEIF before yesterday. I was curious about how my Linux (Pop!_OS 20.04) would handle these files since my iPhone Nextcloud client is set to auto-upload, and Nextcloud server is syncing with my iPhone, Mac, and Linux laptop.

I was surprised to see my test photo “magically” converted to jpeg, but remaining as .HEIC on my mac and iphone. I think this is happening at the Nextcloud server (20.0.7snap1). I searched the nextcloud-server code for “HEIC” and found some hits, but I do not understand the code. Did you ever figure this out?

UPDATE. Based on what I read in another thread, the conversion is taking place in the Nextcloud iOS app. I tested this with an “Air Drop” (bluetooth) of this file from my phone to my Mac. Then I moved it from my Downloads folder on the Mac to Nextcloud/Photos. Next, I logged into Nextcloud in the webapp. The file remained as HEIC on my server, and when I tried to view it on Nextcloud webapp, it broke the viewer. (I think there is an extension for this problem.)

I am curious how my Linux system will handle HEIC, but that is beyond the scope of this discussion.

1 Like

If anyone else is struggling with iPhone uploads to a shared folder being converted to jpegs with a random name and timestamps, maybe vote for https://github.com/nextcloud/server/issues/30375. I think that’s not an uncommon usecase…

1 Like

is there any update on it? its been 11 months already…