Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2520,6 +2520,7 @@ public FilesUploadV2Response filesUploadV2(FilesUploadV2Request req) throws IOEx
FilesCompleteUploadExternalRequest.FileDetails file = new FilesCompleteUploadExternalRequest.FileDetails();
file.setId(fileId);
file.setTitle(uploadFile.getTitle());
file.setHighlightType(uploadFile.getHighlightType());

files.add(file);
}
Expand Down Expand Up @@ -2548,6 +2549,7 @@ public FilesUploadV2Response filesUploadV2(FilesUploadV2Request req) throws IOEx
FilesCompleteUploadExternalRequest.FileDetails file = new FilesCompleteUploadExternalRequest.FileDetails();
file.setId(fileId);
file.setTitle(uploadFile.getTitle());
file.setHighlightType(req.getHighlightType());
files.add(file);
}
return helper.completeUploads(req, files);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public class FilesCompleteUploadExternalRequest implements SlackApiRequest {
public static class FileDetails {
private String id; // required
private String title; // optional
/**
* Optional highlight type hint for the file. The upload processing job may overwrite this value.
*/
private String highlightType;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ public class FilesUploadV2Request implements SlackApiRequest {
* (this is mainly for backward compatibility - using uploadFiles instead is recommended)
*/
private String snippetType;
/**
* Optional highlight type hint for the file. The upload processing job may overwrite this value.
* (this is mainly for backward compatibility - using uploadFiles instead is recommended)
*/
private String highlightType;

/**
* Fetches all the file metadata for better v1 compatibility when this property is true.
Expand Down Expand Up @@ -113,6 +118,10 @@ public static class UploadFile {
* Syntax type of the snippet being uploaded.
*/
private String snippetType;
/**
* Optional highlight type hint for the file. The upload processing job may overwrite this value.
*/
private String highlightType;
}

/**
Expand Down