xybu / onedrive-d-old

Microsoft OneDrive client on Linux.
http://xybu.me/projects/onedrive-d/
GNU Lesser General Public License v3.0
820 stars 143 forks source link

"DO NOT USE UNLESS THERE IS NO PHOTO LARGER THAN 2048*2048 IN YOUR ONEDRIVE REPO." #103

Closed fabioedoardoluigialberto closed 9 years ago

fabioedoardoluigialberto commented 9 years ago

Why? What happens if we do? Can we try and tell you what happens or too dangerous (e.g., risk of corrupting files)? Can we put images folders in the ignore list and use onedrive-d for the rest?

Thanks

xybu commented 9 years ago

By default OneDrive will resize a high-resolution photo to lower-resolution (2048*2048) one (unless you tell it not to). I didn't realize that parameter until recently. I have a tentative fix in future branch but the code as a whole is still far from usable.

And yes you can use ignore list as a workaround.

fabioedoardoluigialberto commented 9 years ago

Thanks for the reply.

As far as I know the downscale happens at the time of the upload, but if photos are already there they should be safe. Are you saying that onedrive-d might rescale also the existing ones? Did you see it happening? If the parameter can't be set yet I'd avoid uploading photos through onedrive-d, that's all.

(Sorry for insisting but I'd really like to use onedrive-d and access photos on repo.)

fokafoga commented 9 years ago

Hi, I use the onedrive-d on openSuSE 13.1. since some days and this was annoying for me. So, I have add the "?downsize_photo_uploads=false" query parameter to PUT URI and the uploading works without any resizing fine. Ref: https://msdn.microsoft.com/en-us/library/dn659726.aspx ("Note When uploading images using the REST API, OneDrive will automatically resize the image to reduce the file size. If you want to avoid this behavior and ensure your file is uploaded as-is, you can add a query string parameter downsize_photo_uploads=false. This will ensure that images are uploaded in original condition without any resizing.")

xybu commented 9 years ago

Another way to modify the code can be seen in file https://github.com/xybu/onedrive-d/blob/future/onedrive_d/od_onedrive_api.py by searching for term "downsize_photo_uploads".

Sincerely,Xiangyu Bu

Date: Sun, 8 Feb 2015 08:10:57 -0800 From: notifications@github.com To: onedrive-d@noreply.github.com CC: xybu92@live.com Subject: Re: [onedrive-d] "DO NOT USE UNLESS THERE IS NO PHOTO LARGER THAN 2048*2048 IN YOUR ONEDRIVE REPO." (#103)

Hi, I use the onedrive-d on openSuSE 13.1. since some days and this was annoying for me.

So, I have add the "?downsize_photo_uploads=false" query parameter to PUT URI and the uploading works without any resizing fine.

Ref: https://msdn.microsoft.com/en-us/library/dn659726.aspx

("Note When uploading images using the REST API, OneDrive will automatically resize the image to reduce the file size. If you want to avoid this behavior and ensure your file is uploaded as-is, you can add a query string parameter downsize_photo_uploads=false. This will ensure that images are uploaded in original condition without any resizing.")

— Reply to this email directly or view it on GitHub.

fokafoga commented 9 years ago

Wow! In my experience, this parametes isn't effect to other file. I'm really looking forward this new release! I hope there are handing of some network exception too. Now the "workers" sometimes stop and can restart by a loop. Thank you the job.

xybu commented 9 years ago

I put the param back to 1.0-dev. It feels guilty leaving the bug there.