{"id":31854,"date":"2023-11-21T07:00:00","date_gmt":"2023-11-21T15:00:00","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=31854"},"modified":"2024-08-14T13:27:27","modified_gmt":"2024-08-14T20:27:27","slug":"react-native-uploading-assets","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/react-native-uploading-assets","title":{"rendered":"React Native \u2013 Uploading Assets"},"content":{"rendered":"\n<p id=\"0ab8\">A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly, breaking things into smaller parts, creating the request, understanding the response, and testing by using practice runs or checking how different parts work together.<\/p>\n\n\n\n<p id=\"9d1c\">You can use the base integrated\u00a0<code>fetch<\/code>\u00a0or a third-party package like\u00a0<code>axios<\/code>,\u00a0which are widely used.<\/p>\n\n\n\n<p id=\"7fed\">However, this article aims to demonstrate the simplicity of uploading a file through Cloudinary\u2019s React Native SDK. With just a handful of lines, you can place your image, video, or file in Cloudinary\u2019s cloud storage. Let\u2019s dive right in and get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup<\/h2>\n\n\n\n<p id=\"b591\">Your initial step is to create a <a href=\"https:\/\/cloudinary.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudinary account<\/a>. Once you\u2019re done with the simple signup, find your <strong>Cloud Name<\/strong> in <strong>Account Details<\/strong>.<\/p>\n\n\n\n<p id=\"3c22\">Let\u2019s get to the coding. Import the Cloudinary SDK, which can easily be done by running the following line:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs shcb-wrap-lines\">npm install cloudinary-react-native<\/code><\/span><\/pre>\n\n\n<p>Or<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs shcb-wrap-lines\">yarn add cloudinary-react-native --save<\/code><\/span><\/pre>\n\n\n<p id=\"a15e\">These lines will import the SDK, and now we can use it to continue our upload process.<\/p>\n\n\n\n<p id=\"1b69\">The next thing we need to do is initialize the Cloudinary object by inputting the following line:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">const<\/span> cloudinary = <span class=\"hljs-keyword\">new<\/span> Cloudinary({\n  <span class=\"hljs-attr\">cloud<\/span>: {\n    <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">'&lt;your_cloud_name&gt;'<\/span>\n  },\n  <span class=\"hljs-attr\">url<\/span>: {\n    <span class=\"hljs-attr\">secure<\/span>: <span class=\"hljs-literal\">true<\/span>\n  }\n});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p id=\"4829\">Here, we&#8217;ll create a new instance of the Cloudinary object and initiate it using our cloud name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Unsigned Upload<\/h2>\n\n\n\n<p id=\"5286\">For the most basic upload, we&#8217;ll need to call the\u00a0<code>upload()<\/code>\u00a0function. First, this function gets our\u00a0<code>cloudinary<\/code>\u00a0object, and then we can add the payload we want to upload. It can be the path to the file, the file in Base64, or a URL to a remote file).<\/p>\n\n\n\n<p id=\"b19e\">We\u2019ll make an\u00a0<code>unsigned<\/code>\u00a0upload, which means we&#8217;ll need to send an upload preset. (I&#8217;ll delve into an explanation of upload presets in a bit.)<\/p>\n\n\n\n<p id=\"d57d\">The full request would like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">const<\/span> options: UploadApiOptions = {\n      <span class=\"hljs-attr\">upload_preset<\/span>: <span class=\"hljs-string\">'&lt;your_upload_preset&gt;'<\/span>,\n      <span class=\"hljs-attr\">unsigned<\/span>: <span class=\"hljs-literal\">true<\/span>,\n}\n\n<span class=\"hljs-keyword\">await<\/span> upload(cloudinary, {<span class=\"hljs-attr\">file<\/span>: filePath, <span class=\"hljs-attr\">options<\/span>: options, <span class=\"hljs-attr\">callback<\/span>: <span class=\"hljs-function\">(<span class=\"hljs-params\">error: any, response: any<\/span>) =&gt;<\/span> {\n  <span class=\"hljs-comment\">\/\/.. handle response<\/span>\n}});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p id=\"50aa\">As you can see in the code above, I put my\u00a0upload preset\u00a0wrapped in the\u00a0<code>UploadApiOptions<\/code>\u00a0object, which has many options for the upload that you can read about\u00a0<a href=\"https:\/\/cloudinary.com\/documentation\/image_upload_api_reference\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p id=\"0b0f\">Let me give more details about the\u00a0upload preset<em>.<\/em><\/p>\n\n\n\n<p id=\"0b0f\">The upload preset\u00a0is a parameter we need to set through Cloudinary\u2019s UI. You can do this by going to the Cloudinary\u00a0<a href=\"http:\/\/www.cloudinary.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">website<\/a>, signing in, and clicking the <strong>Settings <\/strong>icon at the top right.<\/p>\n\n\n\n<p id=\"0b0f\">Click the <strong>Upload<\/strong> option, scroll down, and add a new upload preset, There are many options to customize an upload preset, but we won&#8217;t dive into them in this article.<\/p>\n\n\n\n<p id=\"2e54\">Once we finish creating the\u00a0upload preset, we can use its name in our\u00a0<code>UploadApiOptions<\/code>\u00a0object.<\/p>\n\n\n\n<p id=\"269f\">It\u2019s that simple to upload a file to your Cloudinary\u2019s cloud. When the upload process is done, you\u2019ll get back a response object that contains the result from your upload. After that we can try the various transformations that Cloudinary offers.<\/p>\n\n\n\n<p id=\"cd35\">Transformations are manipulations we can perform on an asset (image, video, etc.). If you want to learn more than the examples shown in this article, I suggest visiting Cloudinary\u2019s\u00a0<a href=\"https:\/\/cloudinary.com\/documentation\/image_transformations\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>.<\/p>\n\n\n\n<p id=\"062c\">We can control our response using the\u00a0<code>callback<\/code>\u00a0parameter that we&#8217;ll send to the\u00a0<code>upload<\/code>\u00a0function, which allows us to get back both\u00a0<code>error<\/code>\u00a0and the actual\u00a0<code>response<\/code>\u00a0which allows us to decide what to do when the upload is complete.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Signed Upload<\/h2>\n\n\n\n<p id=\"ff16\">Signed uploads require a signature that can be created using your Cloudinary API secret. However,\u00a0since we\u2019re working on a client-side, you should never expose your API secret (or any sensitive information) within your application. Instead, you should generate an authentication signature on your server.<\/p>\n\n\n\n<p id=\"8ba8\">Once you have the signature, you can give it to the upload by sending it through the\u00a0<code>UploadApiOptions<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"> <span class=\"hljs-keyword\">const<\/span> options: UploadApiOptions = {\n    <span class=\"hljs-attr\">signature<\/span>: <span class=\"hljs-string\">'&lt;your_signature&gt;'<\/span>,\n }\n\n <span class=\"hljs-keyword\">await<\/span> upload(cloudinary, {<span class=\"hljs-attr\">file<\/span>: filePath, <span class=\"hljs-attr\">options<\/span>: options, <span class=\"hljs-attr\">callback<\/span>: <span class=\"hljs-function\">(<span class=\"hljs-params\">error: any, response: any<\/span>) =&gt;<\/span> {\n    <span class=\"hljs-comment\">\/\/.. handle response<\/span>\n }});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Rename<\/h2>\n\n\n\n<p id=\"e06d\">If you&#8217;d like to rename an asset, you can always do that from Cloudinary\u2019s React Native SDK.<\/p>\n\n\n\n<p id=\"d3cb\">The API call is simple:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">await<\/span> rename(cloudinary,  {<span class=\"hljs-attr\">from_public_id<\/span>: <span class=\"hljs-string\">\"&lt;old_public_id&gt;\"<\/span>, <span class=\"hljs-attr\">to_public_id<\/span>: <span class=\"hljs-string\">\"&lt;new_public_id&gt;\"<\/span>, <span class=\"hljs-attr\">callback<\/span>: <span class=\"hljs-function\">(<span class=\"hljs-params\">error: any, response: any<\/span>) =&gt;<\/span> {\n    <span class=\"hljs-comment\">\/\/.. handle response<\/span>\n}})<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p id=\"1dc7\">As with\u00a0<code>upload<\/code>\u00a0before we need to first send it to the function our\u00a0<code>cloudinary<\/code>\u00a0object.<br>After that, we have two mandatory parameters, which are\u00a0<code>from_public_id<\/code>\u00a0(the old name of the asset) and\u00a0<code>to_public_id<\/code>\u00a0(the new name we want to give that asset).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p id=\"9581\">Using Cloudinary\u2019s SDK, uploading files to your cloud becomes incredibly simple. You have several upload options available:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Unsigned uploads (using upload preset).<\/li>\n\n\n\n<li>Signed uploads.<\/li>\n\n\n\n<li>Rename (you can rename uploaded assets)<\/li>\n<\/ol>\n\n\n\n<p id=\"ae8c\">If you\u2019re interested in delving deeper into Cloudinary\u2019s upload choices, you can find additional information\u00a0<a href=\"https:\/\/cloudinary.com\/documentation\/image_upload_api_reference\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>If you found this article helpful and want to discuss it in more detail, head over to\u00a0<a href=\"https:\/\/community.cloudinary.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudinary Community<\/a>\u00a0forum and its associated\u00a0<a href=\"https:\/\/discord.gg\/cloudinary\" target=\"_blank\" rel=\"noreferrer noopener\">Discord<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly, breaking things into smaller parts, creating the request, understanding the response, and testing by using practice runs or checking how different parts work together. You can use the base integrated\u00a0fetch\u00a0or [&hellip;]<\/p>\n","protected":false},"author":87,"featured_media":31092,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[246,263],"class_list":["post-31854","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-react","tag-sdk"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>React Native \u2013 Uploading Assets<\/title>\n<meta name=\"description\" content=\"A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly,\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"React Native \u2013 Uploading Assets\" \/>\n<meta property=\"og:description\" content=\"A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-21T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-14T20:27:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload-jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1100\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"melindapham\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/react-native-uploading-assets\"},\"author\":{\"name\":\"melindapham\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9\"},\"headline\":\"React Native \u2013 Uploading Assets\",\"datePublished\":\"2023-11-21T15:00:00+00:00\",\"dateModified\":\"2024-08-14T20:27:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/react-native-uploading-assets\"},\"wordCount\":731,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA\",\"keywords\":[\"React\",\"SDK\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2023\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/react-native-uploading-assets\",\"url\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643\",\"name\":\"React Native \u2013 Uploading Assets\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage\"},\"image\":{\"@id\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA\",\"datePublished\":\"2023-11-21T15:00:00+00:00\",\"dateModified\":\"2024-08-14T20:27:27+00:00\",\"description\":\"A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly,\",\"breadcrumb\":{\"@id\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA\",\"width\":2000,\"height\":1100,\"caption\":\"Blog-React_Native_Upload\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"React Native \u2013 Uploading Assets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9\",\"name\":\"melindapham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"caption\":\"melindapham\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"React Native \u2013 Uploading Assets","description":"A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly,","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643","og_locale":"en_US","og_type":"article","og_title":"React Native \u2013 Uploading Assets","og_description":"A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly,","og_url":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643","og_site_name":"Cloudinary Blog","article_published_time":"2023-11-21T15:00:00+00:00","article_modified_time":"2024-08-14T20:27:27+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload-jpg?_i=AA","type":"image\/jpeg"}],"author":"melindapham","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/react-native-uploading-assets"},"author":{"name":"melindapham","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9"},"headline":"React Native \u2013 Uploading Assets","datePublished":"2023-11-21T15:00:00+00:00","dateModified":"2024-08-14T20:27:27+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/react-native-uploading-assets"},"wordCount":731,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA","keywords":["React","SDK"],"inLanguage":"en-US","copyrightYear":"2023","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/react-native-uploading-assets","url":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643","name":"React Native \u2013 Uploading Assets","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage"},"image":{"@id":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA","datePublished":"2023-11-21T15:00:00+00:00","dateModified":"2024-08-14T20:27:27+00:00","description":"A task that mobile developers don\u2019t enjoy dealing with is uploading a file. It involves setting up a network connection, ensuring the API works correctly,","breadcrumb":{"@id":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA","width":2000,"height":1100,"caption":"Blog-React_Native_Upload"},{"@type":"BreadcrumbList","@id":"https:\/\/medium.com\/@adi.mizrahi\/react-native-uploading-assets-f784d676f643#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"React Native \u2013 Uploading Assets"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9","name":"melindapham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","caption":"melindapham"}}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1692903430\/Blog-React_Native_Upload\/Blog-React_Native_Upload.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/31854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=31854"}],"version-history":[{"count":3,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/31854\/revisions"}],"predecessor-version":[{"id":31857,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/31854\/revisions\/31857"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/31092"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=31854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=31854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=31854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}