You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uploading a photo via share dialog from the phone should be not duplicate the photo #1626
As @LukeOwncloud said, that setting is about instant uploads only.
About uploads shared from other apps: we discovered we need to make a temporary copy of the files shared from other apps in some circumstances. In those cases, we moved the temporary file after the copy to the OC folder.
But as you notice, this results in a duplication of the local file that was not happening before. And probably we should have left it the way it was before.
@goopen , if you rewrite the issue description without the references to the setting 'original file will be...', we can keep it to track the problem of unexpected duplication.
We have an option "move / copy" during upload from within our app.
I thought that I had opened a PR for doing the same thing when sharing files from within another app.
Of course this only works if the "file" to send is a real file on the device and not an e.g. cached file.
UploadFileOperation:720 -> sourceFile.delete() is not possible.
sourcefile.canWrite() returns false.
ContextCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE)
while debugging returns 0 which says that the app is allowed to write.
But still the file is not delete-able.
I guess there is a big problem if android 6 (target 23) and photos on external sdcards are in use.
changed the title [-]2.0.0 does not respect setting 'original file will be..'[/-][+]Uploading a photo via share dialog from the phone should be not duplicate the photo[/+]on May 24, 2016
I am still experiencing this issue! Got a Sony Xperia Z5 Compact with Andorid 6.0.1 on it.
I cleared the cache of the App (v2.1) and also reinstalled it, didn't helped.
My OwnCloud Server is hosted on my external Webspace and I am still on v8.x
Could you please describe the steps you followed to see the bug? For instance, what I did
Opened FX File Browser and long-pressed a picture.
Pressed on 'Share', then chose ownCloud in the list of apps.
ownCloud app appears; I choose a folder to upload the picture and press button 'Upload'.
ownCloud disappears (back to FX File Browser), the upload is triggered and ownCloud notification is visible in the status bar while uploading.
Press 'HOME' button to leave file browser, then open ownCloud.
Browse to the folder where the picture was uploaded, and don't touch it. The file is not downloaded (no green checkmark icon on the thumbnail) -> no duplication.
I am usually taking a different way to upload. The way you descriped is working for me, too. No Dubs.
But when I do as follow, it dublicates the photos:
Open OwnCloud App
Select Folder where you want to upload the photo
Press Plus-Symbol (right bottom) and then the Upload-Symbol
Go to folder and photos and select them
Press Upload (Bottom-Button)
When it finished uploading check your File Browser for dublicates
In that case, between steps 4 & 5, change the radio button right above the "Upload" button; with the option "Move file" checked, the file will be taken from the original location into the local ownCloud folder. See that default selection is "Copy file", that duplicates the file.
Thanks! That was the case. So no bug, by Design, eh?
It feels a bit misleading, because, as a Windows-User, I thought "move" means "Copy to Locaten A and delete from source" and "copy" means "copy to location A and leave original file".
Sorry for that, wasn't the idea :S . We had a long discussion about this somewhere in the repo, and what you see is the result of a commitment among different opinions.
I thought "move" means "Copy to Locaten A and delete from source" and "copy" means "copy to location A and leave original file".
It does so, but considering both source folder and target folder in the device (both local). For instance, with "Copy" a picture in your "/sdcard/emulated/0/Camera/" folder will be copied from there to "/sdcard/emulated/0/ownCloud/" folder and stay in both (duplication), but with "Move" the picture will be only available in "/sdcard/emulated/0/ownCloud/" and deleted from "/sdcard/emulated/0/Camera/" . In both cases the picture will be in the server also.
Activity
goopen commentedon Apr 22, 2016
That's odd, must've been broken prior to 2.0.0 then? Because no duplicates where seen when uploading via share dialog, aka no duplicate files.
Anyway, close thread if expected behaivor.
Regards
goopen commentedon Apr 22, 2016
Sounds like a plan, It could be old behavior reintroduced with the pull for improved upload handling.
malkomich commentedon Apr 25, 2016
This is a new behaviour that could be fine, because all the uploads are working this way, except the uploads done from external apps
davivel commentedon Apr 26, 2016
As @LukeOwncloud said, that setting is about instant uploads only.
About uploads shared from other apps: we discovered we need to make a temporary copy of the files shared from other apps in some circumstances. In those cases, we moved the temporary file after the copy to the OC folder.
But as you notice, this results in a duplication of the local file that was not happening before. And probably we should have left it the way it was before.
@goopen , if you rewrite the issue description without the references to the setting 'original file will be...', we can keep it to track the problem of unexpected duplication.
tobiasKaminsky commentedon Apr 26, 2016
We have an option "move / copy" during upload from within our app.
I thought that I had opened a PR for doing the same thing when sharing files from within another app.
Of course this only works if the "file" to send is a real file on the device and not an e.g. cached file.
Edit: There it is: #1542
goopen commentedon Apr 27, 2016
@davivel I've edited the issue description to fit the wanted behaivor discussed here. Let me know if you want me to adjust anything.
Regards
tobiasKaminsky commentedon Apr 29, 2016
UploadFileOperation:720 -> sourceFile.delete() is not possible.
sourcefile.canWrite() returns false.
ContextCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE)
while debugging returns 0 which says that the app is allowed to write.
But still the file is not delete-able.
I guess there is a big problem if android 6 (target 23) and photos on external sdcards are in use.
davivel commentedon May 24, 2016
Thanks, @goopen, it's perfect.
Right, but that's a different issue :)
@rperezb , this would be easy to fix and sneak in the next bug-fixing release.
3 remaining items
davivel commentedon May 24, 2016
Fixed in #1687.
This was a bug I introduced in 2.0.0.
[-]2.0.0 does not respect setting 'original file will be..'[/-][+]Uploading a photo via share dialog from the phone should be not duplicate the photo[/+]davivel commentedon May 27, 2016
Ready to go in next release, coming very soon.
CouchMaster commentedon Aug 24, 2016
I am still experiencing this issue! Got a Sony Xperia Z5 Compact with Andorid 6.0.1 on it.
I cleared the cache of the App (v2.1) and also reinstalled it, didn't helped.
My OwnCloud Server is hosted on my external Webspace and I am still on v8.x
davivel commentedon Aug 26, 2016
I made a fast test; can't see any duplication.
Could you please describe the steps you followed to see the bug? For instance, what I did
CouchMaster commentedon Aug 26, 2016
I am usually taking a different way to upload. The way you descriped is working for me, too. No Dubs.
But when I do as follow, it dublicates the photos:
davivel commentedon Aug 26, 2016
In that case, between steps 4 & 5, change the radio button right above the "Upload" button; with the option "Move file" checked, the file will be taken from the original location into the local
ownCloudfolder. See that default selection is "Copy file", that duplicates the file.CouchMaster commentedon Aug 28, 2016
Thanks! That was the case. So no bug, by Design, eh?
It feels a bit misleading, because, as a Windows-User, I thought "move" means "Copy to Locaten A and delete from source" and "copy" means "copy to location A and leave original file".
davivel commentedon Aug 29, 2016
Yes.
Sorry for that, wasn't the idea :S . We had a long discussion about this somewhere in the repo, and what you see is the result of a commitment among different opinions.
It does so, but considering both source folder and target folder in the device (both local). For instance, with "Copy" a picture in your "/sdcard/emulated/0/Camera/" folder will be copied from there to "/sdcard/emulated/0/ownCloud/" folder and stay in both (duplication), but with "Move" the picture will be only available in "/sdcard/emulated/0/ownCloud/" and deleted from "/sdcard/emulated/0/Camera/" . In both cases the picture will be in the server also.