Skip to content

feat: Updated Readme.md and renamed to file-uploader #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://uploadcare.com/?ref=github-blocks-examples-readme">
<a href="https://uploadcare.com/?ref=github-file-uploader-examples-readme">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://ucarecdn.com/1b4714cd-53be-447b-bbde-e061f1e5a22f/logo-safespace-transparent.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://ucarecdn.com/3b610a0a-780c-4750-a8b4-3bf4a8c90389/logo-transparent-inverted.svg">
Expand All @@ -8,21 +8,21 @@
</a>
</p>
<p align="center">
<a href="https://uploadcare.com?ref=github-blocks-examples-readme">Website</a> •
<a href="https://uploadcare.com/docs/start/quickstart?ref=github-blocks-examples-readme">Quick Start</a> •
<a href="https://uploadcare.com/docs?ref=github-blocks-examples-readme">Docs</a> •
<a href="https://uploadcare.com/blog?ref=github-blocks-examples-readme">Blog</a> •
<a href="https://discord.gg/mKWRgRsVz8?ref=github-blocks-examples-readme">Discord</a> •
<a href="https://twitter.com/Uploadcare?ref=github-blocks-examples-readme">Twitter</a>
<a href="https://uploadcare.com?ref=github-file-uploader-examples-readme">Website</a> •
<a href="https://uploadcare.com/docs/start/quickstart?ref=github-file-uploader-examples-readme">Quick Start</a> •
<a href="https://uploadcare.com/docs?ref=github-file-uploader-examples-readme">Docs</a> •
<a href="https://uploadcare.com/blog?ref=github-file-uploader-examples-readme">Blog</a> •
<a href="https://discord.gg/mKWRgRsVz8?ref=github-file-uploader-examples-readme">Discord</a> •
<a href="https://twitter.com/Uploadcare?ref=github-file-uploader-examples-readme">Twitter</a>
</p>

# 📦 Uploadcare Blocks Examples
# 📦 Uploadcare File Uploader Examples

This repository contains a collection of examples demonstrating the integration of the [Uploadcare Blocks](https://github.com/uploadcare/blocks) library with various front-end stacks. Each example is designed to provide a clear and practical guide on implementing file-uploading features using Blocks in your projects.
This repository contains a collection of examples demonstrating the integration of the [Uploadcare File Uploader](https://github.com/uploadcare/file-uploader) library with various front-end stacks. Each example is designed to provide a clear and practical guide on implementing file-uploading features using File Uploader in your projects.

## Examples

Each directory in this repository represents a different framework maintained by Blocks and contains fully functional file-uploading applications:
Each directory in this repository represents a different framework maintained by File Uploader and contains fully functional file-uploading applications:

* [JavaScript](./examples/js-uploader/)
* [React](./examples/react-uploader/)
Expand All @@ -39,7 +39,7 @@ Each example provides a live demo, instructions to run it locally, and helpful t
## Contribution

You’re always welcome to contribute:
* Create [issues](https://github.com/uploadcare/blocks-examples/issues) every time you feel something is missing or goes wrong.
* Create [issues](https://github.com/uploadcare/file-uploader-examples/issues) every time you feel something is missing or goes wrong.
* Provide your feedback or drop us a support request at <a href="mailto:[email protected]">[email protected]</a>.
* Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
* Fork project, make changes and send it as pull request.
Expand Down
10 changes: 5 additions & 5 deletions examples/angular-uploader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
<a href="https://twitter.com/Uploadcare?ref=github-angular-example-readme">Twitter</a>
</p>

# Angular File Uploader with Uploadcare Blocks
# Angular File Uploader with Uploadcare File Uploader

[![Edit angular-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/blocks-examples/tree/main/examples/angular-uploader/)
[![Edit angular-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/file-uploader-examples/tree/main/examples/angular-uploader/)

This is an example project of implementing a file uploader in an Angular application with [Uploadcare Blocks](https://github.com/uploadcare/blocks).
This is an example project of implementing a file uploader in an Angular application with [Uploadcare File Uploader](https://github.com/uploadcare/file-uploader).

## Run this demo locally

Expand Down Expand Up @@ -51,7 +51,7 @@ Please, read the [File Uploader documentation](https://uploadcare.com/docs/file-

### Angular + Web Components

Blocks are native to the Web but not to Angular. However, Angular does everything to make solutions based on Web Components
File Uploader is native to the Web but not to Angular. However, Angular does everything to make solutions based on Web Components
to work properly with it.

To help Angular to figure out where you're using Web Components, you have to set
Expand All @@ -64,7 +64,7 @@ if you want to know more about using custom elements in Angular.

### Styling

If your styling solution may provide class string or style object, feel free to use them on blocks like
If your styling solution may provide class string or style object, feel free to use them on components like
`uc-file-uploader-regular` and override default class using CSS variables.

Otherwise you may go “full override” way and pass a string with styles to a File Uploader type of your choice.
Expand Down
31 changes: 11 additions & 20 deletions examples/angular-uploader/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<svg xmlns="http://www.w3.org/2000/svg" focusable="false" viewBox="0 0 18 18" width="30" height="30">
<circle cx="9" cy="9" r="9" fill="url(#gradient)"></circle>
<defs>
<radialGradient id="gradient" cx="0" cy="0" r="1" gradientTransform="rotate(149.216 9.368 7.42) scale(17.5848 20.2492)" gradientUnits="userSpaceOnUse">
<radialGradient id="gradient" cx="0" cy="0" r="1"
gradientTransform="rotate(149.216 9.368 7.42) scale(17.5848 20.2492)" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC700"></stop>
<stop offset="1" stop-color="#FFEDAB"></stop>
</radialGradient>
Expand All @@ -13,41 +14,31 @@

<ul class="menu">
<li class="menu-item">
<a
class="link menu-link"
routerLink="form"
routerLinkActive="active"
>Real-life form</a>
<a class="link menu-link" routerLink="form" routerLinkActive="active">Real-life form</a>
</li>

<li class="menu-item">
<a
class="link menu-link"
routerLink="minimal"
routerLinkActive="active"
>Minimal uploader</a>
<a class="link menu-link" routerLink="minimal" routerLinkActive="active">Minimal uploader</a>
</li>

<li class="menu-item">
<a
class="link menu-link"
routerLink="regular"
routerLinkActive="active"
>Regular uploader</a>
<a class="link menu-link" routerLink="regular" routerLinkActive="active">Regular uploader</a>
</li>
</ul>

<div class="source">
<span class="source-title">
Built with Uploadcare Blocks and Angular
Built with Uploadcare File Uploader and Angular
</span>

<a class="link" href="https://github.com/uploadcare/blocks-examples/tree/main/examples/angular-uploader">
<a class="link" href="https://github.com/uploadcare/file-uploader-examples/tree/main/examples/angular-uploader">
<svg xmlns="http://www.w3.org/2000/svg" focusable="false" viewBox="0 0 24 24" width="30" height="30">
<path fill="#24292f" style="fill: var(--ui-control-text-color)" stroke="none" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
<path fill="#24292f" style="fill: var(--ui-control-text-color)" stroke="none"
d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12">
</path>
</svg>
</a>
</div>
</nav>

<router-outlet></router-outlet>
<router-outlet></router-outlet>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="root">
<!--
Note: `uc-config` is the main block we use to configure File Uploader.
It's important to all the context-related blocks to have the same `ctx-name` attribute.
Note: `uc-config` is the main component we use to configure File Uploader.
It's important to all the context-related File Uploader to have the same `ctx-name` attribute.

See more: https://uploadcare.com/docs/file-uploader/configuration/
Available options: https://uploadcare.com/docs/file-uploader/options/
Expand Down
2 changes: 1 addition & 1 deletion examples/angular-uploader/src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Go to https://uploadcare.com/docs/file-uploader/styling/
to read more about Blocks styling
to read more about File Uploader styling
*/
@import '@uploadcare/file-uploader/web/uc-file-uploader-regular.min.css';
@import '@uploadcare/file-uploader/web/uc-file-uploader-minimal.min.css';
Expand Down
4 changes: 2 additions & 2 deletions examples/js-custom-tab/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Blocks composition examples
# File Uploader composition examples

[![Edit composition](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/blocks-examples/tree/main/examples/composition/)
[![Edit composition](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/file-uploader-examples/tree/main/examples/composition/)


## Run this demo locally
Expand Down
6 changes: 3 additions & 3 deletions examples/js-uploader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<a href="https://twitter.com/Uploadcare?ref=github-js-example-readme">Twitter</a>
</p>

# JS File Uploader with Uploadcare Blocks
# JS File Uploader with Uploadcare File Uploader

[![Edit js-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/blocks-examples/tree/main/examples/js-uploader/)
[![Edit js-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/file-uploader-examples/tree/main/examples/js-uploader/)

## Run this demo locally

Expand All @@ -39,7 +39,7 @@ $ npm run start

You’re always welcome to contribute:

* Create [issues](https://github.com/uploadcare/blocks-examples/issues) every time you feel something is missing or goes wrong.
* Create [issues](https://github.com/uploadcare/file-uploader-examples/issues) every time you feel something is missing or goes wrong.
* Provide your feedback or drop us a support request at <a href="mailto:[email protected]">[email protected]</a>.
* Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
* Star this repo if you like it ⭐️
6 changes: 3 additions & 3 deletions examples/next-uploader-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<a href="https://twitter.com/Uploadcare?ref=github-next-example-readme">Twitter</a>
</p>

# Next.js File Uploader with Uploadcare Blocks
# Next.js File Uploader with Uploadcare File Uploader

[![Edit next-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/blocks-examples/tree/main/examples/next-uploader-adapter/)
[![Edit next-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/file-uploader-examples/tree/main/examples/next-uploader-adapter/)

## Run this demo locally

Expand All @@ -38,7 +38,7 @@ $ npm run start

You’re always welcome to contribute:

* Create [issues](https://github.com/uploadcare/blocks-examples/issues) every time you feel something is missing or goes wrong.
* Create [issues](https://github.com/uploadcare/file-uploader-examples/issues) every time you feel something is missing or goes wrong.
* Provide your feedback or drop us a support request at <a href="mailto:[email protected]">[email protected]</a>.
* Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
* Star this repo if you like it ⭐️
6 changes: 3 additions & 3 deletions examples/next-uploader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<a href="https://twitter.com/Uploadcare?ref=github-next-example-readme">Twitter</a>
</p>

# Next.js File Uploader with Uploadcare Blocks
# Next.js File Uploader with Uploadcare File Uploader

[![Edit next-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/blocks-examples/tree/main/examples/next-uploader/)
[![Edit next-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/file-uploader-examples/tree/main/examples/next-uploader/)

## Run this demo locally

Expand All @@ -38,7 +38,7 @@ $ npm run start

You’re always welcome to contribute:

* Create [issues](https://github.com/uploadcare/blocks-examples/issues) every time you feel something is missing or goes wrong.
* Create [issues](https://github.com/uploadcare/file-uploader-examples/issues) every time you feel something is missing or goes wrong.
* Provide your feedback or drop us a support request at <a href="mailto:[email protected]">[email protected]</a>.
* Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
* Star this repo if you like it ⭐️
14 changes: 7 additions & 7 deletions examples/react-uploader-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
<a href="https://twitter.com/Uploadcare?ref=github-react-example-readme">Twitter</a>
</p>

# React File Uploader with Uploadcare Blocks
# React File Uploader with Uploadcare File Uploader

[![Edit react-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/blocks-examples/tree/main/examples/react-uploader-adapter/)
[![Edit react-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/file-uploader-examples/tree/main/examples/react-uploader-adapter/)

This is an example project of implementing a file uploader in a React application with [Uploadcare Blocks](https://github.com/uploadcare/blocks).
This is an example project of implementing a file uploader in a React application with [Uploadcare File Uploader](https://github.com/uploadcare/file-uploader).

## Run this demo locally

Expand Down Expand Up @@ -49,14 +49,14 @@ Please, read the [File Uploader documentation](https://uploadcare.com/docs/file-

## Integration notes

Blocks are native to the Web but not to React. It's easy to use Blocks in a React app, but note that a part of your solution will encapsulate non-React code.
File Uploader is native to the Web but not to React. It's easy to use File Uploader in a React app, but note that a part of your solution will encapsulate non-React code.

E.g. in one of the examples we created a [FileUploader](src/components/FileUploader/FileUploader.tsx) component
which provides React-friendly API for the rest of the view. There are Blocks inside of this component and nowhere else.
which provides React-friendly API for the rest of the view. There is a File Uploader inside this component and nowhere else.

### Styling

If your styling solution may provide class string or style object, feel free to use them on blocks like
If your styling solution may provide class string or style object, feel free to use them on components like
`uc-file-uploader-regular` and override default class using CSS variables.

Otherwise you may go “full override” way and pass a string with styles to a File Uploader type of your choice.
Expand All @@ -67,7 +67,7 @@ Otherwise you may go “full override” way and pass a string with styles to a

You’re always welcome to contribute:

* Create [issues](https://github.com/uploadcare/blocks-examples/issues) every time you feel something is missing or goes wrong.
* Create [issues](https://github.com/uploadcare/file-uploader-examples/issues) every time you feel something is missing or goes wrong.
* Provide your feedback or drop us a support request at <a href="mailto:[email protected]">[email protected]</a>.
* Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
* Star this repo if you like it ⭐️
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export default function Layout() {

<div className={st.source}>
<span className={st.sourceTitle}>
Built with Uploadcare Blocks and React
Built with Uploadcare File Uploader and React
</span>

<a className={st.link} href="https://github.com/uploadcare/blocks-examples/tree/main/examples/react-uploader">
<a className={st.link} href="https://github.com/uploadcare/file-uploader-examples/tree/main/examples/react-uploader">
<svg xmlns="http://www.w3.org/2000/svg" focusable="false" viewBox="0 0 24 24" width="30" height="30">
<path fill="#24292f" style={{ fill: 'var(--ui-control-text-color)' }} stroke="none" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
</svg>
Expand Down
Loading
Loading