Every file uploaded through API Ecommerce — product cover images, product gallery images, user avatars, homepage slider banners, category images, and sale receipt comprobantes — is written to Oracle Cloud Infrastructure (OCI) Object Storage. No files are stored on the application server itself. OCI Object Storage exposes an Amazon S3-compatible API. The application takes advantage of this by using the standardDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSCaicedo/Api-Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
league/flysystem-aws-s3-v3 adapter (already declared in composer.json) mounted on a custom Flysystem disk named oci. This means no OCI-specific SDK is required: the same Storage::disk('oci') facade calls used for S3 work transparently against OCI.
OCI disk configuration
Theoci disk is declared in config/filesystems.php alongside the standard local, public, and s3 disks. The key difference from a vanilla S3 disk is the explicit endpoint override (pointing to the OCI S3-compatibility endpoint) and use_path_style_endpoint set to true, which OCI requires.
use_path_style_endpoint => true is mandatory for OCI because OCI’s S3-compatible API uses path-style addressing (endpoint/bucket/key) rather than subdomain-style addressing (bucket.endpoint/key).
Required credentials
Create an Amazon S3 Compatible API Key in the OCI Console under User Settings → Customer Secret Keys. OCI will generate the access key ID and secret at that point — save the secret immediately, as it cannot be retrieved again.| Variable | Description | Where to find it |
|---|---|---|
OCI_ACCESS_KEY_ID | Customer Secret Key ID | OCI Console → User → Customer Secret Keys |
OCI_SECRET_ACCESS_KEY | Secret paired with the key ID | Shown once at key creation time |
OCI_DEFAULT_REGION | OCI region identifier for the bucket | OCI Console → Object Storage bucket details |
OCI_BUCKET | Name of the Object Storage bucket | OCI Console → Object Storage |
OCI_ENDPOINT | S3-compatible namespace endpoint URL | https://<namespace>.compat.objectstorage.<region>.oraclecloud.com |
OCI_URL | Base URL used by Flysystem for public URL generation | Same value as OCI_ENDPOINT |
sa-saopaulo-1 region:
Storage paths used
The application organises all uploads under a shared prefix (juandevops/ecommerce/public/) inside the bucket. Each resource type has its own sub-directory:
| Resource | Bucket path | Controller |
|---|---|---|
| Product cover & gallery images | juandevops/ecommerce/public/products | Admin\Product\ProductController |
| Category images | juandevops/ecommerce/public/categories | Admin\Product\CategorieController |
| Homepage sliders | juandevops/ecommerce/public/sliders | Admin\SliderController |
| User avatars | juandevops/ecommerce/public/users | AuthController |
| Sale receipt comprobantes | juandevops/ecommerce/public/comprobantes | Ecommerce\SaleController |
Storage::disk('oci')->putFile($path, $file), which assigns a random UUID filename automatically and returns the full object key. That key is persisted to the database and later resolved to a public URL.
URL generation
When an API response needs to include a publicly accessible URL for an uploaded file, the application calls:OCI_URL, the bucket name, and the object key to produce a direct HTTPS URL to the object, for example:
<img> tags. No signed-URL or redirect layer is involved — objects are served directly from OCI.
Local development fallback
During local development you can avoid OCI entirely by switching to the built-inlocal driver. Set the following values in your .env:
storage/app/public/ on the local filesystem. Run php artisan storage:link once to create a symbolic link from public/storage to storage/app/public so the files are accessible over HTTP:
FILESYSTEM_DISK=oci (or leave it unset, since oci is the intended production default) before deploying.
Bucket objects must have public read visibility for
Storage::disk('oci')->url() to return directly accessible URLs. In the OCI Console, set the bucket’s Visibility to Public, or alternatively apply a pre-authenticated request (PAR) policy. Without public read access, the generated URLs will return 403 Forbidden when accessed by clients.