Skip to content

Conversation

zuoRambo
Copy link

No description provided.

filesystem.md Outdated
@@ -1,70 +1,71 @@
# Laravel 的文件系统和云存储功能集成
# 文件系统与云存储
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个标题不用吧 @summerblue

filesystem.md Outdated

Laravel provides a powerful filesystem abstraction thanks to the wonderful [Flysystem](https://github.com/thephpleague/flysystem) PHP package by Frank de Jonge. The Laravel Flysystem integration provides simple to use drivers for working with local filesystems, Amazon S3, and Rackspace Cloud Storage. Even better, it's amazingly simple to switch between these storage options as the API remains the same for each system.
Laravel 提供强大文件抽象能力,这得益于 Frank de Jonge 的 [Flysystem](https://github.com/thephpleague/flysystem) 扩展包。Laravel集成的flysystem提供了可支持本地文件系统、Amazon S3及 Rackspace 云存储的简单易用的驱动程序。更棒的是,由于每个系统的API保持不变,所以在这些存储项之间切换是非常轻松的。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Laravel集成的flysystem -> 空格

filesystem.md Outdated

The `public` disk is intended for files that are going to be publicly accessible. By default, the `public` disk uses the `local` driver and stores these files in `storage/app/public`. To make them accessible from the web, you should create a symbolic link from `public/storage` to `storage/app/public`. This convention will keep your publicly accessible files in one directory that can be easily shared across deployments when using zero down-time deployment systems like [Envoyer](https://envoyer.io).
「公开磁盘」就是指你的文件将可被公开访问,默认下, `public` 磁盘使用 `local` 驱动且将文件存放在 `storage/app/public` 文目录。为了能通过网络访问,你需要创建 `public/storage` `storage/app/public` 的符号链接。这个约定能让你的可公开访问文件保持在同一个目录下,这样在不同的部署系统间就可以轻松共享,如 [Envoyer](https://envoyer.io) 的“不停服”部署系统。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文目录 -> 文件目录

filesystem.md Outdated

To create the symbolic link, you may use the `storage:link` Artisan command:
你就可以使用 `storage:link` Artisan 命令创建符号链接:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是把“就” 删掉会好一些

filesystem.md Outdated

use Illuminate\Support\Facades\Storage;

$url = Storage::url('file1.jpg');

> {note} Remember, if you are using the `local` driver, all files that should be publicly accessible should be placed in the `storage/app/public` directory. Furthermore, you should [create a symbolic link](#the-public-disk) at `public/storage` which points to the `storage/app/public` directory.
> {提示} 切记,如果使用 `local` 驱动,所有想被公开访问的文件都应该放在 `storage/app/public` 目录下。此外,你应该在`public/storage` [创建符号链接 ] (#the-public-disk) 来指向 `storage/app/public` 文件夹。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{note} 不用翻译,查看翻译要求

filesystem.md Outdated

If you would like to pre-define the host for files stored on a disk using the `local` driver, you may add a `url` option to the disk's configuration array:
如果你想给使用 `local` 驱动的存储文件预定义主机的话,你可以在磁盘配置数组中添加 `url` :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

句尾冒号使用全角

filesystem.md Outdated

In addition to reading and writing files, Laravel can also provide information about the files themselves. For example, the `size` method may be used to get the size of the file in bytes:
除了读写文件,Laravel还可以提供有关文件本身的信息。例如,`size` 方法可用来获取以字节为单位的文件大小:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

laravel 之后的空格

filesystem.md Outdated

The `putFile` and `putFileAs` methods also accept an argument to specify the "visibility" of the stored file. This is particularly useful if you are storing the file on a cloud disk such as S3 and would like the file to be publicly accessible:
`putFile` `putFileAs` 方法也接受一个参数指定被存储文件的“可见性”。在使用如 S3 的云存储时,若希望该文件可被公开访问,这将非常有用:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“可见性” 双引号 使用 「」

filesystem.md Outdated
@@ -213,7 +219,7 @@ In web applications, one of the most common use-cases for storing files is stori
class UserAvatarController extends Controller
{
/**
* Update the avatar for the user.
* 更新用户头像.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用全角标点

filesystem.md Outdated

In Laravel's Flysystem integration, "visibility" is an abstraction of file permissions across multiple platforms. Files may either be declared `public` or `private`. When a file is declared `public`, you are indicating that the file should generally be accessible to others. For example, when using the S3 driver, you may retrieve URLs for `public` files.
在Laravel的Flysystem集成里,“可见性” 是跨多平台的文件权限抽象。文件可以被设定为 `public` 或`private` 。当一个文件声明为 `public` 时,就意味着文件一般可供他人访问。例如,使用S3驱动
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

双引号

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有空格

Copy link
Collaborator

@oustn oustn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一些格式需要仔细检查一下

@zuoRambo
Copy link
Author

感谢@oustn 耐心细致的review,提及的问题已经全部fix

Copy link
Collaborator

@oustn oustn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完成第一次 review

@summerblue summerblue merged commit 857e085 into laravel-china:5.4 Feb 21, 2017
@zuoRambo
Copy link
Author

thanks ~ @summerblue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants