Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pekeUpload.js:192 Uncaught TypeError: Cannot read property 'name' of undefined #25

Open
1714578436 opened this issue Jun 15, 2016 · 1 comment

Comments

@1714578436
Copy link

1714578436 commented Jun 15, 2016

I got 2 problems:

error message:

  1. pekeUpload.js:192 Uncaught TypeError: Cannot read property 'name' of undefined
  2. Uncaught ReferenceError: json is not defined

my problems:

  1. always return this error when upload was succeeded, why?
  2. some thing gotta strange:
    2.1 case 1:
    first time to select file for fuPictureUrl, upload complete, but return error as title.
    and then select file for fuQRCodeUrl, upload complete, but return error as title and fuPictureUrl's upload result repeat one time.

(in other words, when I finish all step of case 1, I can see 3 upload result, fuPictureUrl 2 times, fuQRCodeUrl one time)

2.2 case 2:
first time to select file for fuQRCodeUrl, reutrn error as title and upload was not complete. and then select file for fuPictureUrl, upload complete, but the upload result of fuPictureUrl display on fuPictureUrl and fuQRCodeUrl.

(in other words, when I finish all step of case 2, I can see the same upload result on fuPictureUrl and fuQRCodeUrl)

my code brief:

<script type="text/javascript" charset="utf-8" src="assets/js/pekeUpload.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function () {

    $("#fuPictureUrl").pekeUpload({
        maxSize: 0,
        allowedExtensions: "jpeg|jpg|png|gif",
        multi: false,
        btnText: "Select your picture",
        onSubmit: false,
        url: "ashxs/file_upload_handler.ashx"
    });

    $("#fuQRCodeUrl").pekeUpload({
        maxSize: 0,
        allowedExtensions: "jpeg|jpg|png|gif",
        multi: false,
        btnText: "Select QR Code",
        onSubmit: false,
        url: "ashxs/file_upload_handler.ashx"
    });
</script>

<form id="form1" runat="server"><!--Begin Form-->
<table>
<tbody>
<tr>
    <th>Picture</th>
    <td>
        <input id="fuPictureUrl" name="fuPictureUrl" type="file" />
    </td>
</tr>
<tr>
    <td colspan="2">
        <div>Size: Width, 306px; Height, 376 px</div>
        <div>Format: jpeg, png, gif。</div>
    </td>
</tr>
<tr>
    <th>Name</th>
    <td>
        <input id="tbFullName" type="text" />
    </td>
</tr>
<tr>
    <th>IM</th>
    <td>
        <input id="tbVXinCode" type="text" />
    </td>
</tr>
<tr>
    <th>Mobile</th>
    <td>
        <input id="tbMobile" type="text" />
    </td>
</tr>
<tr>
    <th>Office</th>
    <td>
        <input id="tbOffice" type="text" />
    </td>
</tr>
<tr>
    <th>QRCode</th>
    <td>
        <input id="fuQRCodeUrl" name="fuQRCodeUrl" type="file" />
    </td>
</tr>
<tr>
    <td colspan="2">
        <div>Size: Width, 430px; Height, 430 px</div>
        <div>Format: jpeg, png, gif</div>
    </td>
</tr>
<tr>
    <th>修理厂</th>
    <td>
        <select id="garages" name="garages">
            <option value="">-请选择-</option>
<%=Garages %>
        </select>
    </td>
</tr>
</tbody>                            
</table>
<div>&nbsp;</div>
<!--ToolsStript-->
<div class="btn-toolbar">
    <div class="btn-group">
        <span id="save" class="btn btn-sm">保存</span>
        <span id="cancel" class="btn btn-sm">取消</span>
    </div>
</div> <!--ToolsStript-->
</form><!--End Form-->
@pekebyte
Copy link
Owner

Hi, thanks for using PekeUpload, I notice the message error 2 and 1, and I've fixed in the 2.1.1 release 2c9f3ba. Please download and report if your problem persists, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants