mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-07 15:16:41 +02:00
Crop after 15KB and add a note, that it's cropped by the upload.
This commit is contained in:
@@ -58,9 +58,10 @@ public abstract class AbstractFileCommand implements Command
|
|||||||
|
|
||||||
protected String uploadToPastie(final StringBuilder input) throws IOException
|
protected String uploadToPastie(final StringBuilder input) throws IOException
|
||||||
{
|
{
|
||||||
if (input.length() > 10000)
|
if (input.length() > 15000)
|
||||||
{
|
{
|
||||||
input.delete(0, input.length() - 10000);
|
input.delete(0, input.length() - 15000);
|
||||||
|
input.append("## Cropped after 15000 bytes");
|
||||||
}
|
}
|
||||||
final PastieUpload pastie = new PastieUpload();
|
final PastieUpload pastie = new PastieUpload();
|
||||||
return pastie.send(input.toString());
|
return pastie.send(input.toString());
|
||||||
|
Reference in New Issue
Block a user