2019-05-06 07:31:26 -04:00
|
|
|
|
---
|
|
|
|
|
id: bd7158d8c443edefaeb5bd0f
|
2020-12-16 00:37:30 -07:00
|
|
|
|
title: 文件元数据
|
2019-05-06 07:31:26 -04:00
|
|
|
|
challengeType: 4
|
2020-09-18 00:11:18 +08:00
|
|
|
|
forumTopicId: 301506
|
2021-01-13 03:31:00 +01:00
|
|
|
|
dashedName: file-metadata-microservice
|
2019-05-06 07:31:26 -04:00
|
|
|
|
---
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --description--
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
构建一个功能类似于 <https://purple-paladin.glitch.me/> 的 JavaScript 全栈应用。
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
在开发这个项目时,我们推荐你在 [Glitch](https://glitch.com/) 上编码。编码完成之后,你可以把应用主页的链接复制到屏幕的输入框中,测试你的代码是否能通过项目需求。当然你也可以基于其他的平台来完成自己的项目,只要提供一个公开的主页便于我们测试就行。
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
参考示例:你可以通过 [这个链接](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-filemetadata/) 访问在 Glitch 上的项目,或者从 GitHub 上 clone [这个仓库的代码](https://github.com/freeCodeCamp/boilerplate-project-filemetadata/)。如果你使用 Glitch,请记住将项目链接保存到妥当的地方。
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --hints--
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
我可以提交包含文件上传的 FormData 对象。
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
```js
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
```
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
当我提交某些内容时,我将在 JSON 响应中收到以 bytes(字节)为单位的文件大小。
|
2019-05-06 07:31:26 -04:00
|
|
|
|
|
|
|
|
|
```js
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
2019-05-06 07:31:26 -04:00
|
|
|
|
```
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --solutions--
|
|
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
|
```js
|
|
|
|
|
/**
|
|
|
|
|
Backend challenges don't need solutions,
|
|
|
|
|
because they would need to be tested against a full working project.
|
|
|
|
|
Please check our contributing guidelines to learn more.
|
|
|
|
|
*/
|
|
|
|
|
```
|