当我尝试使用wordpress上传图片时出现此错误。它总是上传到100%并显示错误。
picture_3.png (542 kb) 100%
Error: -200, Message: HTTP Error., File: picture_3.png
答案 0 :(得分:0)
这是你的主题function.php
procedure TRooms_Form.FormCreate(Sender: TObject);
var
...
begin
i := 0;
while i < numItems do begin
//Create ListBox item
item := TListBoxItem.Create(nil);
item.Parent := myListBox;
item.StyleLookup := 'styleLBox';
//Number
itemNumber := item.FindStyleResource('btt_number') as TButton;
if Assigned(itemNumber) then begin
itemNumber.Text := jsonNumber;
case jsonColor of
0 : itemNumber.TintObject.TintColor := TAlphaColors.Chocolate;
1 : itemNumber.TintObject.TintColor := TAlphaColors.Gold;
2 : itemNumber.TintObject.TintColor := TAlphaColors.Darkgreen;
3 : itemNumber.TintObject.TintColor := TAlphaColors.Deeppink;
end;
end;
//Type
itemType := item.FindStyleResource('txtstyle_type') as TText;
if Assigned(itemType) then begin
itemType.Text := jsonTypeName;
end;
//Occupation
itemOccup := item.FindStyleResource('txt_occupation') as TText;
if Assigned(itemOccup) then begin
itemOccup.Text := jsonOccup;
end;
//Dates
itemDay := item.FindStyleResource('txt_day') as TText;
if Assigned(itemDay) then itemDay.Text := displayDay;
itemDateStart := item.FindStyleResource('txt_start') as TText;
if Assigned(itemDateStart) then itemDateStart.Text := jsonTimeStart;
itemDateEnd := item.FindStyleResource('txt_end') as TText;
if Assigned(itemDateEnd) then itemDateEnd.Text := jsonTimeEnd;
//Item background
itemBackgr := item.FindStyleResource('background_item') as TRectangle;
if Assigned(itemBackgr) then begin
itemBackgr.Fill.Kind := TBrushKind.Solid;
case jsonStatus of
0 : itemBackgr.Fill.Color := TAlphaColors.White;
1 : itemBackgr.Fill.Color := TAlphaColors.Lightgreen;
2 : itemBackgr.Fill.Color := TAlphaColors.Palegoldenrod;
3 : itemBackgr.Fill.Color := TAlphaColors.Lightcoral;
4 : itemBackgr.Fill.Color := TAlphaColors.Lightseagreen;
5 : itemBackgr.Fill.Color := TAlphaColors.Lightblue;
6 : itemBackgr.Fill.Color := TAlphaColors.Lightgrey;
end;
end;
Inc(i);
end;