파일 업로드 용량제한 초과시 경고창 채택완료
매생이굴국
7년 전
조회 3,704
파일 업로드시 용량이 초과되면 경고창을 띄우고 싶습니다.
기본적으로 제공되는건데 버그로 안되는건지 따로 작업의해야하는지 궁금합니다.
해당아래 소스는 제가 사용하는 게시판의 첨부파일 부분입니다.
기본적으로 나온 게시판 수정없이 사용하고 있습니다.
</p>
<p><?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<div class="bo_w_flie">
<div class="file_wr">
<label for="bf_file_<?php echo $i+1 ?>" class="lb_icon"><i class="fa fa-download" aria-hidden="true"></i><span class="sound_only"> 파일 #<?php echo $i+1 ?></span></label>
<input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file ">
</div>
<?php if ($is_file_content) { ?>
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="full_input frm_input" size="50" placeholder="파일 설명을 입력해주세요.">
<?php } ?></p>
<p> <?php if($w == 'u' && $file[$i]['file']) { ?>
<span class="file_del">
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
</span>
<?php } ?></p>
<p> </div>
<?php } ?></p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
답변에 대한 댓글 1개
�
매생이굴국
7년 전
감사합니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인