Skip to content

HemulGM/ImgBB.API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImgBB.API

Загрузка картинок на хостинг https://imgbb.com/

Получить токен: https://api.imgbb.com/

ImgBB API Wrapper

function Upload(FileName, CallBack, Name, Expiration): TImgBBUploadResponse;
function Upload(Stream, FileName, CallBack, Name, Expiration): TImgBBUploadResponse;
function Upload(URI, CallBack, Name, Expiration): TImgBBUploadResponse;
function Upload(Base64, FileName, CallBack, Name, Expiration): TImgBBUploadResponse;

function UploadGetUrl(FileName, CallBack, Name, Expiration): string;
function UploadGetUrl(Stream, FileName, CallBack, Name; Expiration): string;
function UploadGetUrl(URI, CallBack, Name, Expiration): string;
function UploadGetUrl(Base64, FileName, CallBack, Name; Expiration): string;

Get image url only from file and single call

Memo1.Lines.Add(ImgBBAPI(Token).Upload(EditFileName.Text));

Get full response from base64 image

var ImgBB := TImgBB.Instance(Token);
var Response := ImgBB.Upload(Base64Strings) then
try
  Memo1.Lines.Add(Response.Data.Url);
finally
  Response.Free;
end;

Releases

No releases published

Packages

No packages published

Languages