简体   繁体   中英

sending file to restful web service using features native to oracle apex 4.x

I'm trying to use the standard apex web service form to submit a file. Everything works (I authenticate and access method fine) however the web service finds the file to be 'empty' (non existent I think it means). Anyone got any ideas or even ideas for how I could diagnose this?

I can submit a html form which the web service understands. Unfortunately I don't really want the browser to redirect to the web service and return XML to the user. Maybe I could do something with ajax but it sees better to use the built in apex functionality if possible.

If anyone is interested I'm trying to upload an image to as described here: http://developers.box.net/w/page/12923951/ApiFunction_Upload%20and%20Download It looks simple but I must be missing something to do with using web services with apex!

That is the web service in this screenshot doesn't work:

在此处输入图片说明

however the form:

</form><form action="http://upload.box.net/api/1.0/upload/ao6kfxdc92g9vq3xqzso"
enctype="multipart/form-data" method="POST">
<input type="file" name="new_file1" />
<input type="submit" name="upload_files" value="Upload File" />
</form>

does work. Does any one have any ideas why this doesn't work, or even how to get more information on whats going on?

(I've changed the authentication key in this example.)

From that site:

upload, overwrite, new_copy
Basic upload: To upload a file, you can send an HTTP POST request to:  
https://upload.box.net/api/1.0/upload/<auth token>/<folder id>

try doing a POST instead?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM