mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-09-21 06:19:41 +00:00
Merge 6832e21b12c564d5f4c0ee271c5f0e8b60a54ab7 into 135d3a16777b4fe13d836c47daea13870776df60
This commit is contained in:
commit
3ceeb43f4d
@ -44,6 +44,9 @@ public class AttachmentStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public StreamDetails retrieveAttachment(final String id) throws IOException {
|
public StreamDetails retrieveAttachment(final String id) throws IOException {
|
||||||
|
if (id == null || id.isEmpty()) {
|
||||||
|
throw new IOException("Attachment ID must not be null or empty");
|
||||||
|
}
|
||||||
final var attachmentFile = new File(attachmentsPath, id);
|
final var attachmentFile = new File(attachmentsPath, id);
|
||||||
return Utils.createStreamDetailsFromFile(attachmentFile);
|
return Utils.createStreamDetailsFromFile(attachmentFile);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user