ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Fileupload component on Google App Engine

norberto108
11 Mar 2010 08:01:41 GMT
11 Mar 2010 08:01:41 GMT

Hi,

I got this error when i try to use the new ZK5 Fileupload component, or even the old way

java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details.

Maybe it would become a bug, does anyone has a way to upload a Image to Google App Engine ?


Thanks

norberto108
17 Mar 2010 14:17:13 GMT
17 Mar 2010 14:17:13 GMT

Hi,

I see GAE don´t allow to use java.rmi.server.UID and it is used in

	
org.zkoss.zk.au.http.ZkFileItemFactory

     //-- FileItemFactory --//
    public FileItem createItem(String fieldName, String contentType,
	boolean isFormField, String fileName) {
		return new ZkFileItem(fieldName, contentType, isFormField, fileName,
			getSizeThreshold(), getRepository());
	}

it extends DiskFileItemFactory

org.apache.commons.fileupload.disk.DiskFileItemFactory

    /**
     * UID used in unique file name generation.
     */
    private static final String UID =
            new java.rmi.server.UID().toString()
                .replace(':', '_').replace('-', '_');

I mean GAE does not allow to create files in the remote server. The only way to upload to GAE is here

How do I handle multipart form data? or How do I handle file uploads to my app?

It is a HTML form, HttpServlet response.

My issue is to upload a file to ZK Window and record a ZK Image component with JDO.

Can anyone help me ?

terrytornadoTop Contributor
17 Mar 2010 14:43:21 GMT
17 Mar 2010 14:43:21 GMT

Hmmmmmm, only for interesting me. On which path you would upload images or other things to google app engine ??????
Have you private/public folders there ??

norberto108
17 Mar 2010 14:45:14 GMT
17 Mar 2010 14:45:14 GMT

I dont think so, i plan to upload to a POJO inside a Image field and record it with JDO persistence.

henrichen
18 Mar 2010 20:12:32 GMT
18 Mar 2010 20:12:32 GMT

@norberto108,

Please post to ZK Features. Let's track from there. Thanks.

norberto108
21 Mar 2010 16:31:58 GMT
21 Mar 2010 16:31:58 GMT

Did it