-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tags are lost when uploading or downloading files #10282
Comments
GitMate.io thinks possibly related issues are #1371 (No file-uploading possible at all), #9801 (Error downloading or uploading large files), #4678 ("Connection to server lost" error when uploading/downloading large files), #5438 (Nextcloud won't upload larger files), and #231 (Advanced File Tagging). |
I tested this in my install and found that tags are retained for jpg images, even if I edit the tags in NextCloud before downloading the image. Surely this is related to some sort of content compression. I know when sending images over MMS that ALL metadata is lost for me. I can test tethering from my mobile to see if it happens when I upload using a cellular data connection. Have you tried to check directly in the OS with exiftool?
If you cannot see tags directly on disk you should maybe try narrowing the scope by doing an SSH transfer directly to your home directory and see if the tags are retained with exiftool. |
Andrew, Thank you for your time and your answer. I checked the file directly on my server (via SSH) using the exiftool tool you suggested and I can confirm that the tags are preserved on the metadata of my file when they are uploaded in my Nextcloud website. I also checked transferring the file using SCP and there was no problem as well. When I re-download the files the original Tags are also preserved. So no tags are lost on any transfer. Only the Tags that I generate on the Nextcloud are lost. The title of the issue is misleading: Apparently the Tags of the Nextcloud are not related at all with the Tags of the metadata of a file. Can someone please confirm so? So what are tags in Nextcloud? If this it true I would suggest (maybe close this issue and open a request) to use the metadata tags on Nextcloud. I organize all my photos and musics using Tags and I would love to import them to my Nextcloud to use it as a central storage. |
Oh! Gotcha. The tags are not written to the property sheet of the file. From cli ( putty ) you can see them in the database: |
This was not yet implemented. Also I think it is not possible to set tags from a browser download or read it from a browser upload. Thus it is a pure client feature. There is already a ticket over there and I will close this one here as duplicate of nextcloud/desktop#206 |
Morris, I did not understand why it should be impossible. Couldn't the same function that reads/write the oc_systemtag in the data base, reads (and write if they are not the same) the tags from the metadata of the file on the server? This seems like a server feature, not client. I am tying to understand it better to open an enhancement request (or even try to code myself). |
The server file system was not designed to hold all the information that is in Nextcloud. Otherwise we would run into other issues, if they are updated on the filesystem and not inside Nextcloud. So this is highly unlikely to be implemented. The tags are stored in the DB of Nextcloud. Same way as most of the other metadata is. Also there are multiple different file backends available for Nextcloud that don't support this anyways. |
To get the meta tags in php you can use a extension function ( for extracting them on upload) which would be a nice feature of auto-tagging. PHP has something to handle this called "xattr". The functions are:
the general request is a feature ( presumably for auto-tagging) where upon upload some logic does the following after the file is written to disk and successfully added to the document management system. Just some psuedo-code to get the idea ( I wrote this in about 2 minutes without any testing):
and of course if the tags are set in nextcloud then to set them against the file Tags property. Other notes:
|
This only works for files on the server and not uploaded files. |
Feel free to write an app that does this, but the server will most likely not integrate this. |
Andrew, Thank you for the suggestions and the pseudo-code, I didn't know the xattr function. I will experiment a little during this week. I am learning PHP and I think this can be an interesting challenge. Morris, your point about not every back-end being compatible is valid, however if the server is using some filesystem that does not allow tags in the metadata of the file, this function would just be useless. I do not see any problem or drawback (except maybe for some performance decrease in up- and downloading).
Thank you for the warning. I try to code it as a personal challenge / learning. This function would be useful for me, even if it is not merged. |
There are quite some:
Just to name a few ;) |
The concept in itself is not much more complicated than my trashy mock-up code, but there are indeed a half dozen caveats I can cite off the top @Of my head as this relates to other applications. if @riparise starts the code I'd be happy to assist where I can. I have some of my own issues Im trying to pound out still however so I cannot lead such an effort. ;-\ |
See also: #4216 |
Indeed
Deal with them the same way as current conflicts - such as file name change, sync by updating the most recent tag addition/removal/change for that file.
Renames of tags should only happen for the file concerned. After all, if a User renames a tag, then the server or client should apply the rename to all files with the tag, and that change would be synced per-file.
|
Did you get anywhere with this @riparise ? |
Files tagged on Windows (possibly Linux as well) and uploaded do not show their tags on Nextcloud.
Tags generated on Nextcloud do not show in Windows when Downloaded.
Steps to reproduce
or
Expected behaviour
The tags should be kept while downloading and uploading into Nextcloud.
Actual behaviour
Tags are lost. See images bellow
Server configuration
Operating system:
Debian Stretch
Web server:
NGINX
Database:
MariaDB
PHP version:
PHP 7.0
Nextcloud version:
13.0.2
Updated from an older Nextcloud/ownCloud or fresh install:
Updated
Where did you install Nextcloud from:
https://download.nextcloud.com/server/releases
Signing status:
Signing status
No errors have been found.List of activated apps:
App list
Enabled: - activity: 2.6.1Disabled:
Nextcloud configuration:
Config report
{}
Are you using external storage, if yes which one:
NO
Are you using encryption:
NO
Are you using an external user-backend, if yes which one:
NO
Client configuration
Browser:
Chrome
Operating system:
Windows 10
The text was updated successfully, but these errors were encountered: