0

I have few files regularly created on my mobile phone. How can I upload these files on my ADLS gen2 storage account. I generally use azcopy to copy, but how can it be done on android phones

Is there a upload file rest api for ADLS gen2 or any other SDK?

Paolo
  • 21,270
  • 6
  • 38
  • 69
Nipun
  • 4,119
  • 5
  • 47
  • 83
  • [Azure Data Lake Store REST API](https://learn.microsoft.com/en-us/rest/api/storageservices/data-lake-storage-gen2) – George Chen Jan 02 '20 at 07:15
  • Is this the one https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create. How to upload a file? – Nipun Jan 02 '20 at 08:24

1 Answers1

1

Yes, as @GeorgeChen 's comment said. By now as I known, there is not any SDK for Azure Data Lake Storage Gen2, so the only solution is to use its REST APIs.

There is a very similar SO thread Upload data to the Azure ADLS Gen2 from on-premise using Python or Java which you can refer to, my answer for it to post the Python script which defines 7 functions to help using REST APIs include auth, mkfs, mkdir, touch_file, append_file, flush_file and mkfile.

For using Java, you can refer to my code in Python to write your Java code with okhttp.


Update: I reviewed Azure offical documents and searched the offical GitHub repos for ADLS Gen2, there is a public preview version of ADLS Gen2 SDK named Azure File Data Lake client library for Java. I see it default used the Netty HTTP client, but you can use OkHTTP as the Alternate HTTP client as the content of README said, so I think you can try to use it with the alternate HTTP client OkHTTP for Android.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43