Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
99e13ff3
Commit
99e13ff3
authored
Oct 10, 2017
by
Boris Kocherov
Committed by
Romain Courteaud
Jan 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: mappingstorage: save filename
parent
0763cfb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_ojs_storage_js.js
...js/PathTemplateItem/web_page_module/jio_ojs_storage_js.js
+18
-6
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_ojs_storage_js.js
View file @
99e13ff3
...
...
@@ -391,13 +391,25 @@
&&
mapping_dict
[
attachment_id
]
!==
undefined
&&
mapping_dict
[
attachment_id
].
put
!==
undefined
&&
mapping_dict
[
attachment_id
].
put
.
erp5_put_template
!==
undefined
)
{
return
getSubStorageId
(
storage
,
id
)
.
push
(
function
(
sub_id
)
{
var
url
=
UriTemplate
.
parse
(
mapping_dict
[
attachment_id
].
put
.
erp5_put_template
).
expand
({
id
:
sub_id
}),
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
getSubStorageId
(
storage
,
id
),
storage
.
get
(
id
)
]);
})
.
push
(
function
(
result
)
{
var
sub_id
=
result
[
0
],
doc
=
result
[
1
],
url
=
UriTemplate
.
parse
(
mapping_dict
[
attachment_id
].
put
.
erp5_put_template
).
expand
({
id
:
sub_id
}),
data
=
new
FormData
();
data
.
append
(
"
field_my_file
"
,
blob
);
if
(
doc
.
filename
)
{
data
.
append
(
"
field_my_file
"
,
blob
,
doc
.
filename
);
}
else
{
data
.
append
(
"
field_my_file
"
,
blob
);
}
data
.
append
(
"
form_id
"
,
"
File_view
"
);
return
jIO
.
util
.
ajax
({
"
type
"
:
"
POST
"
,
...
...
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