Hi, I am trying to download all pictures from item table and I found three issues I cant workout:
1. I am using a REPEAT/ UNTIL loop, but the Downloadfromstream only downloads the last picture (this seems to be a pending issue as I read in github). Is there a way to download all pictures in the table and not the last one?
2. Is there a way to have downloadfromstream without prompting the user to confirm the downloading folder? (I am in BC16 Cloud)
3. Is there a way to have this pictures saved in a shared folder?
Thanx
Code:
with item do begin
FindFirst();
repeat
if Picture.Count > 0 then
for Index := 1 to Picture.Count do begin
if TenantMedia.Get(Picture.Item(Index)) then begin
TenantMedia.calcfields(Content);
if TenantMedia.Content.HasValue then begin
FileName := "No." + '-' + format(Index) + GetTenantMediaFileExtension(TenantMedia);
TenantMedia.Content.CreateInStream(PicInstream);
DownloadFromStream(PicInstream, '', '', '', FileName);
end;
end;
end;
until (next() = 0) ;
end;