Advertisement
lewissmallwood

Saving images from CDN to local device

Oct 21st, 2018
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. for (questionnaire in json["questionnaires"]) {
  2. for (question in questionnaire["questions"]) {
  3. for (choice in questions["choices"]) {
  4. if (choice["contentType"] == "image") {
  5. imageURLToDownload = CDN_BASE_URL + choice["content"];
  6. file = DownloadImageURL(imageURLToDownload);
  7. SaveFileToLocalDeviceWithName(file, choice["content"]);
  8. }
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement