Thank you for confirming the issue was resolved.
The fix will also be included with the next release of TMS FMX Cloud Pack.
Hi Bart, I was doing tests in my application and I just detected that the component has other errors, the file is loaded, but it is loaded in the root, it does not respect the folder that you are indicating in the Storage.Upload method (cifolderOS, fn), additionally I am not sure if the Storage.SearchList (folder, false, nil); function is working correctly, this is the code I use
if Storage.Connect then
begin
folder:=Storage.SearchList(carpeta, false, nil);
cifolder:=nil;
if folder.Count>0 then
cifolder:= folder.Items[0]
else
cifolder:=Storage.CreateFolder(nil,carpeta);
if cifolder=nil then
begin
MessageDlg('An error ocurred , the cloud folder not found , try again', TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOK], 0);
{$IFDEF IOS}
TwwPlatformServices.HideWaitDialog;
{$ENDIF}
exit();
end;
folderOS:=Storage.SearchList('OS'+inttostr(MD_Gral.MyQry_SoluHelpDesk.FieldByName('ahelp').value), false, nil);
if folderOS.Count>0 then
cifolderOS:= folderOS.Items[0]
else
cifolderOS:=Storage.CreateFolder(cifolder,'OS'+inttostr(MD_Gral.MyQry_SoluHelpDesk.FieldByName('ahelp').value));
if cifolderOS=nil then
begin
MessageDlg('An error ocurred , it was not possible to create the service order file in the cloud , try again', TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOK], 0);
{$IFDEF IOS}
TwwPlatformServices.HideWaitDialog;
{$ENDIF}
exit();
end;
for i := Low(rutas) to High(rutas) do
begin
fn := rutas[i].ruta;
try
ci :=Storage.Upload(cifolderOS,fn);
if Assigned(ci) then
begin
md_gral.MyQry_LinkHelp.close;
md_gral.MyQry_LinkHelp.open;
md_gral.MyQry_LinkHelp.insert;
md_gral.MyQry_LinkHelp.fieldbyname('helpdesk').value:=MD_Gral.MyQry_SoluHelpDesk.FieldByName('ahelp').value;
md_gral.MyQry_LinkHelp.fieldbyname('link').value:=(ci as TBoxNetItem).getShare;
md_gral.MyQry_LinkHelp.fieldbyname('tipo').value:=rutas[i].tipo;
md_gral.MyQry_LinkHelp.post;
end;
except
end;
end;
Can you help me?
Thanks
I have not been able to reproduce these issues:
-
Uploading a file into a subfolder is working when tested here.
Does the issue happen for any subfolder or only specific subfolders? -
The SearchList call returns all objects matching the Query string. Can you please describe exactly what is going wrong with the SearchList?
Hello Bart, the problem occurs in any subfolder, the problem with the searchlist is that it returns a value even though the folder does not exist and other times it cannot find the folder indicated, in my folder structure there are no files with the same name, this is the structure I am creating
Service(Folder)
------------ OS1983(Folder)
---------------------- File1
---------------------- File2
---------------------- File3
------------ OS1984(Folder)
----------------------File4
----------------------File5
I tell you that this code worked perfectly with the previous version of the component
Hi,
Uploading in subfolders is working as expected when tested here in the CloudStorageDemo.
I also haven't noticed any issues with the SearchList call. There haven't been any changes in this area of the component so I'm not sure what could be causing this.
On which platform(s) can you see the issue?
If the problem persists, can you please provide a ready to run sample project so I can further investigate this?
Hi Bart, in this link you can download the example https://www.dropbox.com/sh/sz2fjor83x73r0w/AABZehEJ9p0_xGUM420bxDOLa?dl=0, the component does not work on any platform
how to use it?
1.- fill in your account information and box folder.
2.- press the connect button, log into the account
3.-press the select button to select the image
4.-press the upload button to upload the file
Thank you
Hi Camacho,
We are investigating this issue and will report back as soon as possible.
The issue has now been fixed.
This will also require a change in your application code.
Please change the following lines:
cifolder:= nil;
if folder.Count>0 then
cifolder := folder.Items[0]
to
cifolder:= TBoxNetItem.Create(nil);
if folder.Count>0 then
cifolder.Assign(folder.Items[0])
The update will be available with the next release of TMS FMX Cloud Pack.
Thanks Bart any estimated release date ?, Can you send me an incremental file?
Hi Camacho,
The target for the next release is early next week.
You can request an incremental source update by sending an email to help@tmssoftware.com requesting the update.
Hi Bart, I just received the file and tested the component, I realize that you are still having problems in the searchlist method (really this already seems like a bad joke), you can try it with the same example that I sent you
thanks
Hi Camacho,
I'm unable to reproduce an issue with the SearchList method in the latest update.
Can you please make sure you made the suggested changes in your example from one of my previous posts?
If the problem persists, please explain exactly what is going wrong so I can further investigate this.
Hi Bart, the suggested changes were made, please see the video https://www.dropbox.com/s/lhsx9ua0c9jdb78/video-1603209565.mp4?dl=0 , the searchlist method returns anything, you can see the OS58 folder does not exist and the method is returning this japanese.xml file to me, therefore the file is not loaded in the correct folder
thanks
I'm not sure what is causing this issue on your side. The sample you provided is working as expected when tested here.
Can you please provide a log file so I can see what is happening in more detail?
To enable logging:
TMSFMXCloudBoxNetDrive1.Logging := True;
TMSFMXCloudBoxNetDrive1.LogLevel := llDetail;
The log file is automatically generated in the machine's Documents folder.
ok, I sent you the log by message
thanks
The log file you provided showed unexpected results for the search action.
This happens because the search query is also matched against file text content.
Please make sure to check if the item(s) in the search result is indeed a folder with the ItemType property.
We'll have to investigate if search functionality can be improved in the future by adding extra parameters to limit the results to only include folders for example.
Hi Bart, the comparison of the text of the file has always been done, in the method there is a parameter called ExactMatch, I want to suppose it is used to retrieve what exactly matches the string to search, as I have been repeating these errors they were not In the previous version of the component, I have the app loaded on my iphone and it works correctly (If you want to check it, I can send you a video), they need to verify what they changed when they added the external browser.
One more question, how do I loop through the results that the SearchList method currently returns?
thanks
Hi,
-
I'm not sure if any changes where made to the Search method when ExternalBrowser was added, but I'll re-open this issue and report back as soon as possible.
-
You can iterate the search results like this:
folderOS := TMSFMXCloudBoxNetDrive1.SearchList(carpetastr, true, nil);
for I := 0 to folderOS.Count do
begin
if folderOS.Items[I].ItemType = cifolder then
Thanks Bart for your support
Hi,
After further investigation I can confirm no changes were made to the SearchList method. I'm not sure what could be causing the difference in search results on your side.
However we'll investigate to add more search options to avoid this issue in the future.