Move image upload to API

closes #3252
- added `/ghost/api/v0.1/uploads/` endpoint
- removed upload method from `controller/admin.js`
- moved removal of temporary files from storage to endpoint (needed to
account for failed uploads)
- changed and moved tests
- Oversight: I think that we use `.otherwise()` and `.catch()` a bit
too extensive and mask the real error objects. We probably need an
error handling strategy at some point in the future.
This commit is contained in:
Sebastian Gierlinger 2014-07-15 12:40:14 +02:00
parent 0122ecd593
commit 5c97e50980

View File

@ -63,7 +63,7 @@ UploadUi = function ($dropzone, settings) {
var self = this;
$dropzone.find('.js-fileupload').fileupload().fileupload('option', {
url: Ghost.subdir + '/ghost/upload/',
url: Ghost.subdir + '/ghost/api/v0.1/uploads/',
add: function (e, data) {
/*jshint unused:false*/
$('.js-button-accept').prop('disabled', true);