Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sencha-filestorage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
sencha-filestorage
Commits
84edd8b7
Commit
84edd8b7
authored
Jun 07, 2019
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed JSON return messages
parent
52f5b69a
Pipeline
#619
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
file-add.tcl
www/file-add.tcl
+3
-3
file-delete.tcl
www/file-delete.tcl
+2
-3
No files found.
www/file-add.tcl
View file @
84edd8b7
...
...
@@ -15,7 +15,7 @@ if {[info exists upload_file]} {
if
{
""
==
$title
}
{
set title
$upload
_file
}
}
else
{
ns_log Notice
"file-add: failure: upload_file does not exist"
ns_return
200
"text/html
"
"{
ns_return
400
"application/json
"
"{
\"
result
\"
: {
\"
success
\"
: false,
\"
errors
\"
: {
\"
upload_file
\"
:
\"
You have to specify a file to upload
\"
}
...
...
@@ -44,7 +44,7 @@ ns_log Notice "file-add: permission_p=$permission_p"
if
{
1 !=
$permission
_p
}
{
ns_log Notice
"file-add: failure: User
\#
$user
_id doesn't have write permissions to folder
\#
$folder
_id"
doc_return
200
"text/html
"
"{
doc_return
400
"application/json
"
"{
\"
result
\"
: {
\"
success
\"
: false,
\"
errors
\"
: {
\"
permission
\"
:
\"
You do not have permission to write to folder
\#
$folder
_id
\"
}
...
...
@@ -76,7 +76,7 @@ if {"" != $upload_file} {
set
folder_path
[
db_string folder_path
"select fs_folder_path from im_biz_objects where object_id = :ticket_id"
]
ns_log Notice
"file-add: success"
doc_return 200
"
text/html
"
"{
doc_return 200
"
application/json
"
"{
\"
result
\"
: {
\"
success
\"
: true,
\"
message
\"
:
\"
File successfully created
\"
,
...
...
www/file-delete.tcl
View file @
84edd8b7
...
...
@@ -25,10 +25,9 @@ db_release_unused_handles
ad_http_cache_control
ns_log Notice
"file-delete: success"
ns_return 200
"
text/html
"
"{
ns_return 200
"
application/json
"
"{
\"
result
\"
: {
\"
success
\"
: true,
\"
errors
\"
: {
\"
email
\"
:
\"
already taken
\"
}
\"
success
\"
: true
}
}"
ad_script_abort
...
...
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