• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Still not able to read Blob img or pdf
#1
Bonjour,
First I want to say a big Merci to Jamil Semaan for the great support of the last days. I emailed Jamil two bug that I am having with Blob read and every time he answered me the same day or the nest day with pertinent information.

So Jamil I followed your last information and I updated my CanelaDB folder and my initialization code to the latest version.

But when I use the generated code from the Manager to readBlob I am still getting in the tOutputA variable the recordID of the Blob not the path.

I use the Sync function tho create a copy of my tables  on the cloud to a local version. I can see that the data where copy inside the CanelaDB/Database folder.

I tested on the local database and got the same result, the recordID instead of the path.

As the correction been tested on your side that shows the path instead of the recordID of the Blob ?

Again Merci for your support Jamil

Jean
  Reply
#2
(05-17-2019, 02:29 AM)Jean2080 Wrote: Bonjour,
First I want to say a big Merci to Jamil Semaan for the great support of the last days. I emailed Jamil two bug that I am having with Blob read and every time he answered me the same day or the nest day with pertinent information.

So Jamil I followed your last information and I updated my CanelaDB folder and my initialization code to the latest version.

But when I use the generated code from the Manager to readBlob I am still getting in the tOutputA variable the recordID of the Blob not the path.

I use the Sync function tho create a copy of my tables  on the cloud to a local version. I can see that the data where copy inside the CanelaDB/Database folder.

I tested on the local database and got the same result, the recordID instead of the path.

As the correction been tested on your side that shows the path instead of the recordID of the Blob ?

Again Merci for your support Jamil

Jean

Good Morning Jean,

Thank you for your detailed feedback and questions. To answer this question and clarify, I do not believe there is a readBlob code snippet in the LCM code generator--there are only snippets for basic CRUD on standard records at the moment. To read the blob and get the file path in your code, once you have its recordID, call the function cdb_readBlob() using that recordID from the cdbBlobs table as the first parameter.
  Reply
#3
I did use the Manager to produce the following code by clicking with the right button and getting the following code from the sub menu  to copy to my card code


local tRecordIDs, tOutputA
put "7b93ab2c-cbb0-4b48-8a99-efc2f315e182" into tRecordIDs
replace comma with lf in tRecordIDs
put cdb_read("cdbBlobs",tRecordIDs,"local") into tOutputA.

"7b93ab2c-cbb0-4b48-8a99-efc2f315e182" is what is copied in tOutputA, this  is the recordID of the image blob,
not a path as you indicated in your previous email.

I ran this test in local mode, after using code to sync cloud and local and verifying that I had data in the local canelaDB/database folder.

I still dont see what I am doing wrong.
You did not answer me about if you ran the same test on your side and got an image or pdf to display in a card, did you get a working result ?.

I have another question:
When I first created the table I use a screen in Manager, and when I created the key StepPDF,  I was able to choose Blob as type of key.
Then when I uploaded a pdf file in the cmbBlobs I was able to see it in a windows in Manager when I double click the StepPDF field and choose view in the sub menu.

I then added another key StepIMG to be able to save an image to go with the pdf, I was not able to Identify this key as being a link to a blob.
I their a way to do this presently in the manager ?

Merci
Jean
  Reply
#4
I Just loaded the most recent update to LiveCloud, I really appreciate the speed of your response to our bug declarations.

At the moment My setup for programming my project is:

MACOS  HIGH SIERRA 10.13.6
LIVECODE VERSION  9.5-RC-1 Business Edition
DaTagrid Helper 2 version 2.5.1
LIVECLOUD Version 2.2.5 (05/19/2019) latest update


I use the Sync command to make sure that the same info is on the hardware and cliud.
I use this code:

   get cdb_sync("*","cdbBlobs","cloud",true,false)
   get cdb_sync("*","Subject","cloud",true,false)

I tested both cloud and local use by replacing the word cloud by local and the image was displayed properly for both  Wink
I use an image field to display the image

local tOutput   
   put cdb_readBlob("5499a868-8036-4a8e-a003-54c1ffed4ab8","cloud","MIXKIT_BETA_01") into tOutput
   set the filename of image "imgLogo" to  tOutput
 local tOutput
   
   
I tested both cloud and local use by replacing the word cloud by local and the PDF was displayed properly for both  Wink
I use a browser widget to display the PDF
I use the Replace code because without it the PDF could not display
   
   put cdb_readBlob("e71307fa-fa1a-4930-986d-a6e0790bbc5c","local","MIXKIT_BETA_01") into tOutput
   replace " " with "%20" in tOutput -- code based on script used with revbrowser 
   replace "|" with "%7C" in tOutput -- code based on script used with revbrowser 
   set the URL of widget "pdfBrowser" to tOutput


I tested on the following system:

MAC OS : Everything work ok


iPhone IOS : Both image and PDF work OK, but I got no display a couple of times, Then I noticed that if I Sync before I displaying Image or PDF they work the first time form the local and cloud database.
I use 4 different images and DF and I notices sometime a delay between displaying a different choice. 


Android : The images display properly from local and cloud database.
I can not get the Browser Widget to work properly on Android,
I tested with a separate link to an PDF document on one of my web server and could not get it to display.
So I have to investigate if the Browser Widget need more code or something else to work on Android.



Windows : For a reason I dont understand The generated Windows App (exe) could not open on a Windows Version 10 Laptop.
A previous version that do not use LiveCloud works fine on the same Laptop.

I will keep you posted with my effort to have everything working on all 4 systems....

I look forward to the LiveCloud presentation tomorrow on the Livecode Event.


Merci to Jamil and the LiveCloud team for the fast support.
  Reply
#5
Hi Jean,

Thank you for your evaluation. It is very helpful.

For now, please do not use LiveCode 9.5 dp1. We will push an update this week that will allow you to use 9.5. Until then, please stick with LiveCode 9.0.5.

Windows should work equally to Mac. Our apps are cross-platform and test Windows very well. If you are using 9.0.5 all should be well. Let me know more about your version when you get a chance.

The first thing that comes to mind regarding iOS is the storage space is more limited. I think we need to test Blobs more on mobile to verify that everything is working as expected. We will test this week and report back.

Thank again for all of your test results.

-Mark
  Reply
#6
Thumbs Up 
This is to report I solved the problem I was having with my app test on the Windows environment.
The reason I could not have my app displayed on the main screen was because I used 3 screens when I code, The app was displayed on the second screen and kept those coordinates, so it was not displaying on the main screen.
I corrected the problem by moving my app to the main screen, and now it displays properly. 

The problem I am having with Android version of my app not displaying the menu and navigation bar as nothing to do with LiveCloud. I will be testing and correcting this bug in the next weeks and post a status on it.

Please consider this post as Bug Resolved.

We decided to rewrite and build our MIXKIT Beta with LiveCoud, (previously our app was using LiveCode Server, MySQL and some API for security) and it should be launch on Indiegogo in 30 days.

Again merci to Jamil and the support staff.
  Reply
#7
(06-08-2019, 04:47 PM)Jean2080 Wrote: This is to report I solved the problem I was having with my app test on the Windows environment.
The reason I could not have my app displayed on the main screen was because I used 3 screens when I code, The app was displayed on the second screen and kept those coordinates, so it was not displaying on the main screen.
I corrected the problem by moving my app to the main screen, and now it displays properly. 

The problem I am having with Android version of my app not displaying the menu and navigation bar as nothing to do with LiveCloud. I will be testing and correcting this bug in the next weeks and post a status on it.

Please consider this post as Bug Resolved.

We decided to rewrite and build our MIXKIT Beta with LiveCoud, (previously our app was using LiveCode Server, MySQL and some API for security) and it should be launch on Indiegogo in 30 days.

Again merci to Jamil and the support staff.

This is great news! Glad you resolved this issue. Let us know when your app is launched on Indiegogo.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)