Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ea9851f6
authored
Apr 04, 2017
by
Germán Callejas Alcántara
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Cambiado commit anterior (añadido populate(uri_sound))
parent
d140acb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
sails/src/api/controllers/StudentController.js
sails/src/api/controllers/StudentController.js
View file @
ea9851f6
...
@@ -1243,9 +1243,10 @@ module.exports = {
...
@@ -1243,9 +1243,10 @@ module.exports = {
return
res
.
serverError
(
"Error uploading "
+
err
?
err
:
""
);
return
res
.
serverError
(
"Error uploading "
+
err
?
err
:
""
);
StuPicto
.
findOne
({
id
:
req
.
body
.
id
})
StuPicto
.
findOne
({
id
:
req
.
body
.
id
})
.
then
(
soundFileName
=>
{
.
then
(
picto
=>
{
return
res
.
ok
(
soundFileName
);
return
res
.
ok
(
picto
);
})
})
.
populate
(
'uri_sound'
,
soundFileName
)
.
catch
(
err
=>
{
.
catch
(
err
=>
{
fs
.
unlink
(
uploadedFiles
[
0
].
fd
);
fs
.
unlink
(
uploadedFiles
[
0
].
fd
);
return
res
.
serverError
(
"Error uploading "
+
err
);
return
res
.
serverError
(
"Error uploading "
+
err
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment