File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 139139 }
140140 Promise . all ( [ klecks . getPNG ( ) , klecks . getPSD ( ) ] ) . then ( ( [ png , psd ] ) => {
141141 const TotalSiz = ( ( png . size + psd . size ) / 1024 / 1024 ) . toFixed ( 3 ) ;
142- if ( < ?= h ( $max_pch ) ?> && TotalSiz > < ?= h ( $max_pch ) ?> ) {
143- return alert ( `<?php if ($en): ?>File size is too large.<?php else: ?>ファイルサイズが大きすぎます。<?php endif; ?>\n<?php if ($en): ?>limit size<?php else: ?>制限値<?php endif; ?>:<?= h($max_pch) ?>MB\n<?php if ($en): ?>Current size<?php else: ?>現在値<?php endif; ?>:${ TotalSiz } MB` )
142+ const max_pch = Number ( < ?= h ( $max_pch ) ?> ) ; // 最大サイズ
143+ if ( max_pch && TotalSiz > max_pch ) {
144+ return alert ( `<?php if ($en): ?>File size is too large.<?php else: ?>ファイルサイズが大きすぎます。<?php endif; ?>\n<?php if ($en): ?>limit size<?php else: ?>制限値<?php endif; ?>:${ max_pch } MB\n<?php if ($en): ?>Current size<?php else: ?>現在値<?php endif; ?>:${ TotalSiz } MB` )
144145 }
145146 const formData = new FormData ( ) ;
146147 formData . append ( "picture" , png , 'blob' ) ;
You can’t perform that action at this time.
0 commit comments