mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
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:
parent
0122ecd593
commit
5c97e50980
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user