views:

91

answers:

1
<body>
    <form action="<%= blobstoreService.createUploadUrl("/upload") %>" 
          method="post" 
         enctype="multipart/form-data"
    >
        <input type="file" name="myFile">
        <input type="submit" value="Submit">
    </form>
</body>

the above code throws a java.lang.NoSuchMethodError on compilation.I can't understand and what is blobstoreService in the above code ?

A: 

You are missing the header

<%@ page import="com.google.appengine.api.blobstore.BlobstoreServiceFactory" %> <%@ page import="com.google.appengine.api.blobstore.BlobstoreService" %>

<% BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); %>

Upload Test " method="post" enctype="multipart/form-data">