Skip to content

7.9.0

Compare
Choose a tag to compare
@binaryk binaryk released this 03 Feb 15:52
· 13 commits to 7.x since this release
1d7370b

Added

Customizing File Display

By default, Restify will display the file's stored path name. However, you may customize this behavior.

Displaying temporary url

For disks such as S3, you may instruct Restify to display a temporary URL to the file instead of the stored path name:

  field('path')
      ->file()
      ->path("documents/".Auth::id())
      ->resolveUsingTemporaryUrl()
      ->disk('s3'),

The resolveUsingTemporaryUrl accepts 3 arguments:

  • $resolveTemporaryUrl - a boolean to determine if the temporary url should be resolved. Defaults to true.

  • $expiration - A CarbonInterface to determine the time before the URL expires. Defaults to 5 minutes.

  • $options - An array of options to pass to the temporaryUrl method of the Illuminate\Contracts\Filesystem\Filesystem implementation. Defaults to an empty array.

Displaying full url

For disks such as public, you may instruct Restify to display a full URL to the file instead of the stored path name:

  field('path')
      ->file()
      ->path("documents/".Auth::id())
      ->resolveUsingFullUrl()
      ->disk('public'),

Fixed

  • fix: fixing dynamic user class