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 }}
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
I am trying to add tags to a file via the updateFileMetadata method provided by FileService. However, when adding a tag, for example tag1, to a file, the tag tag_word is also automatically added. The problem also occurs with updateCommunityFileMetadata. This is my method for adding tags to a file:
public static void updateFileMetaData(final Connection connection, final String communityId, final File file, final List<String> tags)
{
final FileService service = new FileService(connection.getEndpoint());
Map<String, String> paramsMap = null;
if (tags != null) { paramsMap = buildFileTags(tags); }
try
{
if (paramsMap != null)
{
if (communityId.isEmpty()) { service.updateFileMetadata(file, paramsMap); }
else { service.updateCommunityFileMetadata(file, file.getLibraryId(), paramsMap); }
}
}
catch (final ClientServicesException e) { throw new RuntimeException(e); }
}
public static Map<String, String> buildFileTags(final List<String> tags)
{
final FileCreationParameters p = new FileCreationParameters();
for (final String tag : tags) { p.tags.add(tag); }
return p.buildParameters();
}
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to add tags to a file via the updateFileMetadata method provided by FileService. However, when adding a tag, for example tag1, to a file, the tag tag_word is also automatically added. The problem also occurs with updateCommunityFileMetadata. This is my method for adding tags to a file:
The text was updated successfully, but these errors were encountered: