Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

How do I copy an external file to the system.DocumentsDirectory folder?
Started by support_pz Oct 01 2018 11:07 PM

No replies to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 12 posts
  • Corona SDK

Hi all,


I need access to the users file so the file can be upload it to our server.


Eg, a business app where a user can choose a file located on their device / or the cloud and upload it to our server for processing.


For our Android version of the app, we are using a plugin called the 'Android File Picker (https://marketplace.coronalabs.com/corona-plugins/android-file-picker) that allows a user to select a file from the cloud (eg Dropbox / Google Drive) or somewhere on their device.  Once the user selects the file, it gets copied to the system.DocumentsDirectory folder which we can then happily read and upload.


I've checked the available plugins but I don't think there is an iOS equivalent (possibly because Apple don't allow it).  Have I missed it?


I've had a quick look at the Corona SDK iCloud plugin which looks like can return a list of files that we can read and save in system.DocumentsDirectory.  Is this the way to go?


Are there any other options on iOS?