8. Storage Related Resources

8. Storage Related Resources

Consider a situation when you need to create a resource that references a file (e.g: an image). The file needs to be uploaded before resource creation and after requested to get the credentials allowing you to upload to the storage service.

The steps are:

  • call GET resources#new endpoint to get the presigned_url for file upload
  • upload the file using the presigned_url via a PUT request
  • call POST resources#create endpoint to actually create the resource
    • Related Articles

    • 8. Storage Related Resources

      Consider a situation when you need to create a resource that references a file (e.g: an image). The file needs to be uploaded before resource creation and after requested to get the credentials allowing you to upload to the storage service. The steps ...
    • Background related guidelines

      Your app behavior should be adapted depending on the background permissions you asked for in the app plist, and on the ones granted by your users. Refer to https://docs.nao-cloud.com/docs/mobile-sdk/ios-sdk/configure-your-xcode-project/ for more ...
    • 5. Creating, Updating and Deleting Resources

      NAO Cloud allows resources of a given type to be created and allows some existing resources to be modified or deleted. A request either succeeds or fails atomically (in a single “transaction”). No partial updates are allowed. Creating Resources A ...
    • 3. URL Design

      URLs for a collection of resources are formed from the resource type. For example a collection of resources of type sites will have the URL: /api/v2/sites Treat collections of resources as sets keyed by resource ID. The URL for an individual resource ...
    • Synchronization

      NAOSDK services need ressources for the SDK to provide users with a location. The services inputs (e.g. positioning database) can either be stored in your application assets or downloaded from NAO Cloud at runtime in a synchronization step. You can ...