Fonction ExtraitMultipart  [Web]

Description

Extrait un contenu Type mime : multipart


Cette fonction permet d'exploiter le retour brut d'un appel à une fonction http(s)xxxx qui renvoie un typemime multipart.


Elle découpe le multipart et renvoie une matrice dont les lignes contiennent les informations suivantes pour chaque multipart :

  • le cid
  • le multipart en lui même (le contenu) en texte ou en fichier (en fonction du mimetype)
  • le mimetype

Syntaxe

ExtraitMultipart(< Texte ou fichier >, < Indice / CID / Mimetype > [, < Force matrice ? > ])

  • < Texte ou fichier > : Le texte ou une valeur fichier
  • < Indice / CID / Mimetype > : Si c'est un entier, alors c'est un indice, sinon c'est un cid ou mimetype.
  • < Force matrice ? > : Force le résultat dans tout les cas sous forme de matrice de tableau de valeur

Exemple

ExtraitMultipart( HttpGet( "http://homer-validator/SIMAX_GetMultipartRelated.php"

, "brut" : 1

)

, "image/*"

)


Retourne

"<part2.CD530594.CDABA69C@chilkatsoft.com>";"motor.png";"image/png"

"<part3.95822522.900C12A5@chilkatsoft.com>";"bike.png";"image/png"

"<part4.4F6ABBF5.81FB7721@chilkatsoft.com>";"devis.png";"image/png"

"<part5.87D73A8E.9D11F065@chilkatsoft.com>";"geography.png";"image/png"

"<part6.22DEAEDB.CC13CD06@chilkatsoft.com>";"microchip.png";"image/png"