Hello,
I believe since packet 2.1.1.1 of "TMS Cloud Pack for FireMonkey" (I don't know the version of TMSFMXCloudGDrive) the upload of files to Google Drive produces invalid files.
I thought it was a problem of mine but today I tested the UCloudStorageDemo to upload a simple text file. The result is that the file inlcudes the header information:
--AaB03x
Content-Disposition: form-data; name="userfile"; filename="test.txt"
Content-Type: application/octet-stream
here is my text
--AaB03x--
And the seond problem is:
Since the last update of 2.3.1 my app can't find specific folders. Up to version 2.1.1.1 it still works.The operation should be: find a specific folder and give me the CloudItem. If the folder don't exists than create the folder structure. With the new version the following code don't work anymore.
function Get_GDrive_AppFolder : TTMSFMXCloudItem;
procedure CheckAndCreateFolders(CIs : TTMSFMXCloudItems; FolderParts : TArray<String>; Level : integer = 0);
var
i: Integer;
CI: TTMSFMXCloudItem;
fp: Integer;
begin
for i := 0 to CIs.Count-1 do
begin
CI := CIs.Items;
if CI.ItemType = ciFolder then
begin
if (CI.FileName.ToUpper = FolderParts[Level].ToUpper) then
begin
Inc(Level);
if CI is TGDriveItem then
begin
CI_AppFolderGDrive := CI;
end;
if CI.Folder <> NIL then
CheckAndCreateFolders(CI.Folder, FolderParts, Level) // recursive
else
for fp := Level to Length(FolderParts)-1 do
begin
CI := TMSGoogleDrive.CreateFolder(CI, FolderParts[fp]);
CI_AppFolderGDrive := CI;
end;
end;
end
end;
end;
var
FolderParts : TArray<String>;
const
cFolderGDrive = 'Apps/Myname/data';
begin
Result := NIL;
FolderParts := Helptools.explode('/', cFolderGDrive); // explode is a funktion like PHP function
CheckAndCreateFolders(TMSGoogleDrive.Drive, FolderParts);
Result := CI_AppFolderGDrive;
end;
At the moment I'm not able to use the Google Drive functionality! Do you have a solution?
Best regards