Skip to content

Commit

Permalink
There
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalina committed Mar 24, 2016
1 parent 780af3d commit 770a977
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 600 deletions.
139 changes: 2 additions & 137 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,144 +2,9 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Upload by fmalina</title>

<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-light.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Upload</title>
</head>
<body>
<div class="wrapper">
<header>
<h1>Upload</h1>
<p>HTML5 Upload library with django backend and image manipulation tools</p>

<p class="view"><a href="https://github.com/fmalina/upload">View the Project on GitHub <small>fmalina/upload</small></a></p>


<ul>
<li><a href="https://github.com/fmalina/upload/zipball/master">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/fmalina/upload/tarball/master">Download <strong>TAR Ball</strong></a></li>
<li><a href="https://github.com/fmalina/upload">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>
<a id="html5-upload-with-photo-rotatecrop-tools-and-django-backend" class="anchor" href="#html5-upload-with-photo-rotatecrop-tools-and-django-backend" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>HTML5 upload with photo rotate/crop tools and Django backend</h1>

<p>.. image:: <a href="https://travis-ci.org/fmalina/upload.svg?branch=master">https://travis-ci.org/fmalina/upload.svg?branch=master</a>
:target: <a href="https://travis-ci.org/fmalina/upload">https://travis-ci.org/fmalina/upload</a></p>

<p>A reusable Django app to work with photo and file uploads.</p>

<ul>
<li>contains native JavaScript multifile drag and drop upload UI with instant thumbnails and progress bars, see upload/static/upload.js</li>
<li>python/PIL backend for upload, cropping and rotation of photos</li>
<li>seamless integration into Django projects</li>
<li>image cropping UI (uses jQuery)</li>
</ul>

<p>Thumbnails are generated using python PIL/Pillow using easy-thumbnails or compatible thumbnailing application such as sorl-thumbnails.</p>

<p>Uploaded files are grouped into collections, the collection model is swappable via settings, so uploaded files can be grouped to a Page, Gallery or RealityListing.</p>

<p>upload.js builds on the following HTML5 demos:
<a href="http://html5demos.com/dnd-upload">http://html5demos.com/dnd-upload</a>
<a href="http://html5demos.com/file-api">http://html5demos.com/file-api</a>
upload.js uses the W3C File API. Repository contains backup of examples for article that initially inspired the development
<a href="https://dev.opera.com/articles/w3c-file-api/">https://dev.opera.com/articles/w3c-file-api/</a></p>

<h2>
<a id="installation-into-a-django-project" class="anchor" href="#installation-into-a-django-project" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Installation (into a Django project)</h2>

<p>To get the latest version from GitHub</p>

<p>::</p>

<pre><code>pip install -e git+git://github.com/fmalina/upload.git#egg=upload
</code></pre>

<p>Add <code>upload</code> to your <code>INSTALLED_APPS</code></p>

<p>::</p>

<pre><code>INSTALLED_APPS = (
...,
'upload',
)
</code></pre>

<p>Configure your settings to suit, see upload/app_settings.py.
You can use the collection model provided or plug your own using
settings.py:</p>

<p>::</p>

<pre><code>UPLOAD['collection_model'] = 'yourcastleapp.Castle'
</code></pre>

<p>Add the <code>upload</code> URLs to your <code>urls.py</code></p>

<p>::</p>

<pre><code>urlpatterns = [
...
url('', include('upload.urls')),
]
</code></pre>

<p>Create your tables</p>

<p>::</p>

<pre><code>./manage.py migrate upload
</code></pre>

<h2>
<a id="usage" class="anchor" href="#usage" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Usage</h2>

<p>Setup a collection</p>

<pre><code>This app supports multiple collections (or your custom model) with
multiple files in each collection.

Add files
</code></pre>

<p>Drag and drop upload photos and files into your application.
Files can have alternative description and are orderable (TODO, jQuery UI demo).</p>

<h2>
<a id="remarks" class="anchor" href="#remarks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Remarks</h2>

<p>Upload shines best for sites that need user uploaded photo galleries.</p>

<p>It will automatically shard the storage folder so as to not hit ext3 subfolder limit (~32000 folders).</p>

<p>Included is also a backup management tool to sync/download publicly uploaded files from server to a local machine.</p>

<h2>
<a id="planned-features" class="anchor" href="#planned-features" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Planned features</h2>

<p>Current storage layout presumes collections to be related to users, which will be addressed in the next update.</p>

<h2>
<a id="contribute" class="anchor" href="#contribute" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Contribute</h2>

<p>Fork it and send your pull request. File and issue. Mention on your blog, tweet, status update. Tell your dev friends and mention when complaining to sites that have poor upload features.</p>

<p>Flask reusability rewrite would be a welcome contribution, if you need another server backend such as for MongoDB or PHP please fork off and let me know how you get on.</p>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/fmalina">fmalina</a></p>
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>

<a href="https://github.com/fmalina/upload">Continue to Github repository &rarr;</a>
</body>
</html>
17 changes: 0 additions & 17 deletions javascripts/scale.fix.js

This file was deleted.

6 changes: 0 additions & 6 deletions params.json

This file was deleted.

116 changes: 0 additions & 116 deletions stylesheets/github-light.css

This file was deleted.

Loading

0 comments on commit 770a977

Please sign in to comment.