Skip to content

Commit

Permalink
Загрузка фото идет по url uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
klimashkin committed Jul 20, 2013
1 parent 4c65951 commit 34c5312
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions public/history.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
0.8.1 / 2013-07-20
==================

* (added) Футер страницы
* (fixed) Роли в информации о пользователе
***
Полный список изменений: https://github.com/klimashkin/pastvu/compare/0.8.0...0.8.1

Expand Down
2 changes: 1 addition & 1 deletion public/js/module/user/photoUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ define(['underscore', 'Browser', 'Utils', 'socket', 'Params', 'knockout', 'knock
// Initialize the jQuery File Upload widget:
this.$fileupload.fileupload();
this.$fileupload.fileupload('option', {
url: 'http://' + P.settings.server.domain() + ':' + P.settings.server.uport() + '/',
url: 'http://' + P.settings.server.domain() + ':' + P.settings.server.uport() + '/upload',
dropZone: $(document), //this.$dom.find('.addfiles_area'),
pasteZone: $(document),
singleFileUploads: true,
Expand Down
5 changes: 5 additions & 0 deletions uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ var Utils = require('./commons/Utils.js'),
.parse(req);
},
serve = function (req, res) {
if (req.url !== '/upload') {
res.statusCode = 403;
res.end();
return;
}
setAccessControlHeaders(res);

switch (req.method) {
Expand Down

0 comments on commit 34c5312

Please sign in to comment.