Quand je télécharge une image je ne peux pas la lire sur certains téléphones (When I download an image I can't read it on certain phones)

presque ! pourquoi je n'obtient pas l'id et l'url dans la cellule de l'image de googlesheet, car sinon je ne peux pas récupérer l'image quand je me déconnecte et reconnecte ?
comment faire ?

I'm not sure what you mean...is the image ID not being saved in the googleSheet (in cell D2 if I remember correctly)?

oups ! je me suis trompé , c'était dans la cellule D3 qu'il y a l'image(pas dans la D2).
j'ai modifié dans le script et j'obtient l'ID de l'image.
Capture3

Donc : je reçois l'image dans google drive, je reçois l'ID dans la cellule de googlesheet de l'image, elle s'affiche dans l'application, jusque là tout va bien.
Mais quand je sors de l'application et que je reviens pour voir l'image, elle n'y est pas, c'est à dire que l'emplacement de l'image est vide, hors je voudrais qu'elle reste . Est ce que c'est j'ai mal placé les blocs ?
Dans mon script j'ai "ReadReportData" qui me sert à lire les données et images, est ce qu'il faut le modifier ?

You need to do the same...rad the ID, join it to the fixed part of the URL ad set it to a image.

Are you calling to "ReadReportData" when initializing the app? If yes, then you only need to extract the ID from the responseContent...what are you receiving in that response?

si comme ça je l'ai dans le bloc web, il faut le mettre dans le bloc du bouton ?
Capture3

Et non je n'appelle pas "ReadRepportData" dans le bloc "initialisation"

You need to read the data from googleSheet...you can do it reusing any function you already have or doing a new one in your script.
Then, you get the image ID (the blocks will depend on what your function returns).

comme par exemple j'ai ce bouton avec la fonction qui me permet de lire

et je joint ce bloc image à mon bouton ?

Capture3

First check what responseContent are you getting with that to be sure what to do with the response to extract the ID. If the response is different probably you will need to extract the ID using other blocks...try and paste here the responseContent.

plus haut j'avais déjà obtenu la reponsecontent en mettant l'étiquette image dans le bloc "web gotText" comme ça !

f0f2a19a9385671ce43a7e0f1d22242edc205623_2_690x234

aprés je ne sais pas comment faire dans le bloc du bouton ?

When do you get that answer? When do you upload an image?

quand je clique sur ce" bouton14" qui me permet d'envoyer l'image sur google drive, et ce même bouton me permet de changer d'écran pour lire l'image
Capture2

voilà le bouton pour sélectionner un image de ma galerie
Capture5

Referring again to the title of this topic, what you want is to also be able to see on another device the image that has been uploaded to Google Drive (and whose ID you have stored in GoogleSheet), right?

If you want to see the image uploaded with that other device, do you have to upload an image as well? I imagine not... then you need, when you start the app or through a button (or whatever), to read the stored ID from GoogleSheet. What blocks/script are you going to do it with?

Something like this:

with a new function in the script:

 if ( func == 'imageID' ) {
   var ref = sh.getRange('D2').getValue();
   return ContentService.createTextOutput(ref);
 }

And like you are getting directly the cell D2 then you can display the image like this:

oui

le script à la fonction de "ReadReportData" qui me permet de lire les données :

if (e.parameter.func == "ReadReport") {

var nom = e.parameter.nom ;

var bricolages = e.parameter.bricolages.replaceAll('|','\n') ;

var imagebrico1 = e.parameter.imagebrico1 ;

var imagebrico2 = e.parameter.imagebrico2 ;

var imagebrico3 = e.parameter.imagebrico3 ;

var sorties = e.parameter.sorties.replaceAll('|','\n') ;

var imagesortie1 = e.parameter.imagesortie1;

var imagesortie2 = e.parameter.imagesortie2;

var imagesortie3 = e.parameter.imagesortie3 ;

var evenemts = e.parameter.evenemts.replaceAll('|','\n');

var imageevene1 = e.parameter.imageevene1;

var imageevene2 = e.parameter.imageevene2;

var imageevene3 = e.parameter.imageevene3;

sh.appendRow([nom,bricolages,imagebrico1,imagebrico2,imagebrico3,sorties,imagesortie1,imagesortie2,imagesortie3,evenemts,imageevene1,imageevene2,imageevene3]);

SpreadsheetApp.flush();

var ref = ;

var rg = sh.getDataRange().getValues();

for (var i=0;i<rg.length;i++) {

if (rg[i][0] == nom) {

ref.push(rg[i][0]);

ref.push(rg[i][1].replaceAll('\n','|'));

ref.push(rg[i][2]);

ref.push(rg[i][3]);

ref.push(rg[i][4]);

ref.push(rg[i][5].replaceAll('\n','|'));

ref.push(rg[i][6]);

ref.push(rg[i][7]);

ref.push(rg[i][8]);

ref.push(rg[i][9].replaceAll('\n','|'));

ref.push(rg[i][10]);

ref.push(rg[i][11]);

ref.push(rg[i][12]);

}

}

return ContentService.createTextOutput(JSON.stringify(ref)).setMimeType(ContentService.MimeType.JSON);

}

if (e.parameter.func == "ReadReportData"){

SpreadsheetApp.flush();

var ref = ;

var rg = sh.getDataRange().getValues();

for (var i=0;i<rg.length;i++) {

if (rg[i][0] == nom) {

ref.push(rg[i][0]);

ref.push(rg[i][1].replaceAll('\n','|'));

ref.push(rg[i][2]);

ref.push(rg[i][3]);

ref.push(rg[i][4]);

ref.push(rg[i][5].replaceAll('\n','|'));

ref.push(rg[i][6]);

ref.push(rg[i][7]);

ref.push(rg[i][8]);

ref.push(rg[i][9].replaceAll('\n','|'));

ref.push(rg[i][10]);

ref.push(rg[i][11]);

ref.push(rg[i][12]);

}

}

return ContentService.createTextOutput(JSON.stringify(ref)).setMimeType(ContentService.MimeType.JSON);

}

Ok, then you already have a function, and you already have a button (or whatever) to get the data when you want to see the image. What response do you get when calling to that function?

j'obtiens ça ,
mais je pense que l'étiquette " imagebrico1" doit être modifier pour que l'image s'affiche dans l'application ?

The blocks you have pasted are not related to the response...

Anyway, if that is the response, then you only have to place it together the fix part:

je mets ces étiquettes sans changer le script ?
et "global fiximageURL" c'est bien " https://drive.google.com/uc?export=download&id=" ?

yes, if you are getting the response that you say.....

je vous montre la réponse.
les 2 données qui sont soulignées en bleu , se sont des données que j'ai dans googlesheet, mais sinon j'obtient l'URL et l'ID

je pense qu'il faut que je modifie l'étiquette image dans toute les fonctions que j'ai, car j'en ai plusieurs.
Vous voulez que j'envoie mon projet aia, peut être que ce sera mieux pour voir tous les blocs ?