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
l10n.translations.en = { | |
logout: 'Log out', | |
error: { | |
a: 'Something went wrong. Please', | |
b: 'reload', | |
c: 'Here some technical details:' | |
}, | |
sourceName: { | |
gdrive: 'Google Drive', | |
dropbox: 'Dropbox', |
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
### Get all files stored in your Uploadcare project in CSV. | |
import pyuploadcare | |
import csv | |
from pyuploadcare import Uploadcare | |
uploadcare = Uploadcare(public_key='public', | |
secret_key='secret') |
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
# coding: utf-8 | |
# Есть такой код. Сделайте что-нибудь с Item.get_options(). | |
from django.db import models | |
class Item(models.Model): | |
# ..... | |
def get_options(self): |
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
#!/bin/python | |
# installation: | |
# pip install pytz pyuploadcare==1.3.1 | |
import pytz | |
from datetime import timedelta, datetime | |
from pyuploadcare import conf | |
from pyuploadcare.api_resources import FileList |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script> | |
UPLOADCARE_PUBLIC_KEY = 'demopublickey'; | |
</script> | |
<script charset="utf-8" src="https://ucarecdn.com/widget/1.4.0/uploadcare/uploadcare-1.4.0.min.js"></script> | |
</head> |
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
{ | |
"name": "uploadcare/custom-s3", | |
"description": "Custom S3 storage example", | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "Dmitry Mukhin", | |
"email": "dm@uploadcare.com" | |
} | |
], |
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
# installation: | |
# pip install pyuploadcare==1.3.1 | |
from pyuploadcare import conf | |
from pyuploadcare.api_resources import FileList | |
import requests | |
conf.pub_key = 'demopublickey' |
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
._list { | |
padding-top: 20px; | |
} | |
._item { | |
padding: 0 0 10px; | |
display: inline-block; | |
text-align: center; | |
vertical-align: top; | |
width: 100px; | |
word-break: break-word; |
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
import os | |
import binascii | |
import pyuploadcare | |
from pyuploadcare import conf | |
from pyuploadcare.api_resources import File | |
conf.pub_key = "demopublickey" | |
conf.secret = "demoprivatekey" |
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
var multipleWidget = uploadcare.MultipleWidget("[role=uploadcare-uploader]"); | |
$ = uploadcare.jQuery; // skip this if you already have jQuery on the page | |
multipleWidget.onChange(function(group) { | |
if (group) { | |
group; // group object | |
group.files(); // array of file objects | |
$.when.apply(null, group.files()).then(function() { | |
arguments; // array of individual file infos | |
$.each(arguments, function() { | |
console.log(this.cdnUrl); // URL of uploaded file |
NewerOlder