File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/components/log/EntryEditor/Description Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ const Description = ({ form, attachmentsDisabled }) => {
135135 let imageFile = null ;
136136 for ( let item of items ) {
137137 if ( item . kind === "file" && item . type . match ( / ^ i m a g e / ) ) {
138- imageFile = generateUniqueFileName ( item . getAsFile ( ) ) ;
138+ imageFile = item . getAsFile ( ) ;
139139 }
140140 }
141141 if ( imageFile ) {
@@ -154,7 +154,9 @@ const Description = ({ form, attachmentsDisabled }) => {
154154 */
155155 const addEmbeddedImage = ( file , width , height ) => {
156156 const id = uuidv4 ( ) ;
157- appendAttachment ( new OlogAttachment ( { file, id } ) ) ;
157+ appendAttachment (
158+ new OlogAttachment ( { file : generateUniqueFileName ( file ) , id } )
159+ ) ;
158160 const imageMarkup = `{width=${ width } height=${ height } }` ;
159161 let description = getValues ( "description" ) || "" ;
160162 description += imageMarkup ;
You can’t perform that action at this time.
0 commit comments