{"id":15018447,"url":"https://github.com/nativescript/sample-imageupload","last_synced_at":"2025-10-19T16:30:59.778Z","repository":{"id":141979915,"uuid":"54722975","full_name":"NativeScript/sample-ImageUpload","owner":"NativeScript","description":"An integration of nativescript-image-picker and nativescript-background-http","archived":false,"fork":false,"pushed_at":"2019-01-07T16:43:16.000Z","size":1466,"stargazers_count":22,"open_issues_count":2,"forks_count":19,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-29T15:51:52.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NativeScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-03-25T14:14:04.000Z","updated_at":"2020-07-22T09:05:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"4165bd9e-130f-4203-a2ea-0bbe222d4e9d","html_url":"https://github.com/NativeScript/sample-ImageUpload","commit_stats":{"total_commits":25,"total_committers":8,"mean_commits":3.125,"dds":0.52,"last_synced_commit":"4e3206a0c099a9337f894e524cdbfcac374698dd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fsample-ImageUpload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fsample-ImageUpload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fsample-ImageUpload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fsample-ImageUpload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NativeScript","download_url":"https://codeload.github.com/NativeScript/sample-ImageUpload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237163216,"owners_count":19265227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:51:58.739Z","updated_at":"2025-10-19T16:30:54.415Z","avatar_url":"https://github.com/NativeScript.png","language":"JavaScript","readme":"# sample-ImageUpload\nSample app showing an integration of nativescript-image-picker and nativescript-background-http plugins.\n\n## Usage\n\nConnect your device or start your prefered emulator/simulator.\nTnen from the root app directory start your cmd/shell\n\nfor android\n```\ntns run android\n```\n\nfor ios\n```\ntns run ios\n```\nAlternativly you can use the livesync command.\nFor better understanding of the tns commands [please follow this link](http://docs.nativescript.org/start/getting-started#development-workflow)\n\n## iOS * \nPlease note the `NSAppTransportSecurity` key in the `app/App_Resources/iOS/Info.plist`:\n```\n\t\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\t\u003cdict\u003e\n\t\t\u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n\t\t\u003ctrue/\u003e\n\t\u003c/dict\u003e\n```\nThis allows uploads to non secure servers.\n\n## Android * \nFor Android SDK 23 and newer versions an explicit permissions are required from the user.\nIn this app [https://www.npmjs.com/package/nativescript-permissions](nativescript-permissions) plugin was used to require permission for reading from the app storage.\nFor lower SDK versions the permissions are set in _App_Resources/Android/AndroidManifest.xml_\n\n```\n    if (platformModule.device.os === \"Android\" \u0026\u0026 platformModule.device.sdkVersion \u003e= 23)  {   \n        permissions.requestPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE, \"I need these permissions to read from storage\")\n        .then(function() {\n            console.log(\"Permissions granted!\");\n            startSelection(context);\n        })\n        .catch(function() {\n            console.log(\"Uh oh, no permissions - plan B time!\");\n        });\n    } else {\n        startSelection(context); // lower SDK versions will grant permission from AndroidManifest file\n    }\t\n\n```\nThis allows uploads to non secure servers.\n\n\u003e Note\n\u003e\n\u003e If you test this example via emulator you will need to save some images to your emulator storage.\n\u003e ```\n\u003e 1. open a browser \n\u003e 2. find \u0026 long-press an image \n\u003e 3. save\n\u003e ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fsample-imageupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript%2Fsample-imageupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fsample-imageupload/lists"}