DocsReference
Star us on Github
Back to reference
  • Getting Started

    • Overview & Installation
  • APIs

    • api()
    • api.get()
    • api.post()
    • api.put()
    • api.delete()
    • api.patch()
    • api.methods()
    • api.all()
  • Collections

    • collection()
    • collection.collection()
    • collection.query()
    • collection.query.where()
    • collection.query.limit()
    • collection.query.page_from()
    • collection.query.fetch()
    • collection.query.stream()
    • collection.doc()
    • collection.doc.get()
    • collection.doc.set()
    • collection.doc.delete()
    • collection.doc.collection()
  • Topics

    • topic()
    • topic.publish()
    • topic.subscribe()
  • Queues

    • queue()
    • queue.send()
    • queue.receive()
  • Secrets

    • secret()
    • secret.put()
    • secret.version()
    • secret.latest()
    • secret.version.access()
  • Storage

    • bucket()
    • bucket.file()
    • bucket.files()
    • file.read()
    • file.write()
    • file.delete()
    • file.download_url()
    • file.upload_url()
  • Schedules

    • schedule()

Storage

Python - bucket.file()

Create a reference to a file within a bucket.

from nitric.resources import bucket

assets = bucket('assets').allow('reading')

logo = assets.file('images/logo.png')

Parameters


name required string

The unique name/reference to the file.


Notes

The file does not need to exist, only a reference to that file is being created.

Available Operations

  • file.read()
  • file.write()
  • file.delete()
  • file.getDownloadUrl()
  • file.getUploadUrl()
Previous
bucket()
Next
bucket.files()

On this page

  1. Parameters

  2. Notes

  3. Available Operations

  • Company

  • Blog
  • Open Source
  • About Us
  • Use Cases
  • Framework

  • APIs
  • Collections
  • Messaging
  • Secrets
  • Storage
  • Developers

  • Docs
  • Languages
  • Reference
  • Downloads
  • Build with us

  • Support
  • Community
  • Roadmap

Get our newsletter

© 2023 Nitric Inc.

Contact SalesTerms & Privacy