Skip to content

Instantly share code, notes, and snippets.

Dmitry Mukhin dmitry-mukhin

Block or report user

Report or block dmitry-mukhin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View en.js
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',
dd if=/dev/urandom of=garbage bs=5M count=1
curl -F file=@garbage -F UPLOADCARE_PUB_KEY=demopublickey -w "\n%{speed_upload}\n%{time_connect} %{time_starttransfer} %{time_total}\n"
dmitry-mukhin / composer.json
Last active Feb 13, 2017
Saving uploaded files to custom S3 key with PHP
View composer.json
"name": "uploadcare/custom-s3",
"description": "Custom S3 storage example",
"license": "MIT",
"authors": [
"name": "Dmitry Mukhin",
"email": ""
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>JS Bin</title>
UPLOADCARE_PUBLIC_KEY = 'demopublickey';
<script charset="utf-8" src=""></script>
import os.path
import string
VALID_CHARS = "_%s%s" % (string.ascii_letters, string.digits)
def clean_filename_part(part):
return ''.join(c for c in part if c in VALID_CHARS)
View delete.cs
var client = new RestClient("");
var request = new RestRequest("files/{uuid}/storage/", Method.DELETE);
request.AddHeader("Authorization", "Uploadcare.Simple demopublickey:demoprivatekey");
// execute the request
RestResponse response = client.Execute(request);
View multiupload-fileinfo.js
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
import os
import binascii
import pyuploadcare
from pyuploadcare import conf
from pyuploadcare.api_resources import File
conf.pub_key = "demopublickey"
conf.secret = "demoprivatekey"
dmitry-mukhin /
Last active Jun 2, 2017
delete uploadcare files older than 14 days
# 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
View printmonster.css
._list {
padding-top: 20px;
._item {
padding: 0 0 10px;
display: inline-block;
text-align: center;
vertical-align: top;
width: 100px;
word-break: break-word;
You can’t perform that action at this time.