-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from nuxt-modules/feat/upload-widget
Feat/upload widget
- Loading branch information
Showing
21 changed files
with
846 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,6 @@ | |
"nuxt": "^3.6.2" | ||
}, | ||
"dependencies": { | ||
"@nuxtjs/cloudinary": "^2.2.0" | ||
"@nuxtjs/cloudinary": "^2.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<CldImage | ||
src="cld-sample-5" | ||
width="900" | ||
height="900" | ||
alt="Sample Product" | ||
crop="fill" | ||
:effects="[ | ||
{ | ||
background: 'green', | ||
}, | ||
{ | ||
gradientFade: true, | ||
}, | ||
{ | ||
gradientFade: 'symetric,x_0.5', | ||
}, | ||
]" | ||
/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { ref } from "vue"; | ||
const resource = ref(); | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<CldUploadButton | ||
upload-preset="nuxt-cloudinary-unsigned" | ||
:on-upload=" | ||
(result, widget) => { | ||
resource.value = result?.info; | ||
widget.close(); | ||
} | ||
" | ||
> | ||
Upload | ||
</CldUploadButton> | ||
<p>URL: {{ resource?.secure_url }}</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# CldUploadButton.vue | ||
|
||
--- | ||
|
||
# Getting Started with CldUploadButton | ||
|
||
The CldUploadButton creates a button element that uses an instance of the [Cloudinary Upload Widget](https://cloudinary.com/documentation/upload_widget) to give you an easy way to add upload capabilities to your Next.js app. | ||
|
||
The CldUploadButton component wraps the [CldUploadWidget](/clduploadwidget) component providing a pre-defined UI (a button). The same concepts apply, including having the option of using Signed or Unsigned uploads. | ||
|
||
## Basic Usage | ||
|
||
```html | ||
<CldUploadButton uploadPreset="<Upload Preset>">Upload</CldUploadButton> | ||
``` | ||
|
||
:upload-button |
Oops, something went wrong.