Crop after 15KB and add a note, that it's cropped by the upload.

This commit is contained in:
snowleo 2011-10-27 00:06:15 +02:00
parent 60b9d4fc80
commit 4b6fc99a62

View File

@ -58,9 +58,10 @@ public abstract class AbstractFileCommand implements Command
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();
return pastie.send(input.toString());