Cloudinary Java direct upload BAD REQUEST error

I used Java for building Image upload tag:

Map options = ObjectUtils.asMap("resource_type", "auto"); options.put("callback", "http://localhost:8080/cloudinary_cors.html"); Map htmlOptions = null; String html = cloudinary.uploader().imageUploadTag("image_id", options, htmlOptions);

Put this String to Model attribute and show on page. Looks like button

.

Picked some image and jquery.fileupload tried to send this image to Cloudinary.

I took Status Code: 400 Bad Request and response:

error: {message: "Upload preset must be specified when using unsigned upload"}

All of my settings is right, I can send image from server side, using this code:

Map uploadResult = cloudinary.uploader().upload("image.jpg", ObjectUtils.emptyMap())

but I can't send file from client side.

Code of page:

<!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org"> <head> <script th:src="@{/js/common/jquery-1.11.3.min.js}" type="text/javascript"/> <script th:src="@{/js/cloudinary/jquery.ui.widget.js}" type="text/javascript"/> <script th:src="@{/js/cloudinary/jquery.iframe-transport.js}" type="text/javascript"/> <script th:src="@{/js/cloudinary/jquery.fileupload.js}" type="text/javascript"/> <script th:src="@{/js/cloudinary/jquery.cloudinary.js}" type="text/javascript"/> </head> <body> <span th:utext="${cloudyURL}" th:remove="tag"></span> <!-- config CloudinaryApi --> <script th:inline="javascript"> $.cloudinary.config({"cloud_name":"CLOUDNAME", "api_key":"APIKEY"}); </script> </body> </html>

I read all of Cloudinary manuals, github issues, stackoverflow answers but can't force working direct upload. Please help me, deal with this problem.

-------------Problems Reply------------

An Upload preset must be specified error response usually means that the signature isn't passed as part of the upload options. Can you share a URL to a live webpage where this is demonstrated?

Can you also share a demonstration of how the input field is generated (i.e., show it under the 'Developer tools')?

If privacy is an issue, please feel free to contact Cloudinary's support team.

Also, you can have a look at the Sample project(https://github.com/cloudinary/cloudinary_java/tree/master/samples)

Category:java Views:2 Time:2018-11-05

Related post

  • 400 Bad Request Error uploading videos to YouTube using C# YouTube API 2011-06-09

    I can't seem to get my ASP.net application to succesfully publish to my YouTube account but not matter what I do I get a 400 Bad Request error . I used the YouTube documentation to create my code and obtaining a dev key. Also, I am not receiving and

  • Tumblr Xauth Android - 400 Bad Request Error 2012-01-24

    I am trying to use Xuath with Tumblr. I have already emailed the Tumblr Support team to enable Xuath for my app and they obliged. However, while trying to retrieve the user key and secret, I continually get a '400: Bad Request' error. I couldn't find

  • Bad Request Error 400 - WCF Client 2009-10-22

    I have a WCF Web Service Running on my IIS. It takes data from client and inserts in the Database. My Web Service requies an object of complex Data type Players. In the Client I create an object of Players and pass it to the Web Service to do the Wor

  • Azure Service Mgmt Api configuration change (400 Bad request error) 2012-03-14

    i am trying to upload a configuration file using the azure management api. I am getting a 400 bad request error and i cannot figure out why, any suggestions? Here is the API doc for the change configuration operation. http://msdn.microsoft.com/en-us/

  • 400 bad request error when opening websites in Internet Explorer 11 2013-06-20

    Original Title: "9TP/1.1 91680753 Content-Length: 89 Content-Type: text/html 400 Bad Request" on almost all web pages I updated last night to IE11 last night, and now I am receiving a 400 bad request error on almost all of the web pages I go to. in a

  • Valid XML for posting to QuickBooks Online Edition - Receiving (400) Bad Request Error 2009-07-20

    I am trying to post the below xml to https://apps.quickbooks.com/j/AppGateway and all I keep getting is the error: The remote server returned an error: (400) Bad Request. Does anyone have any ideas what I am doing wrong? See below for the C# code tha

  • IIS Smooth Streaming Manifest Bad Request Error 2010-05-23

    I installed IIS Media Services 3.0, and the Big Buck Bunny sample, but when I try to get the manifest file (http://localhost/Big_Buck_Bunny/Big Buck Bunny.ism/Manifest), I get 400.0 Bad Request error from the SmoothHandler. So the default.html appear

  • ASP.NET and 400 Bad Request Error 2010-06-29

    Sometimes I get 400 Bad Request error for different websites written on ASP.NET. The only solution I know is to clean up cookies for that site. Seems like that the cause of problem is _utmz and _utma cookies, which belong to Google Analytics. The pro

  • Bad Request Error 400 on IIS7 .NET 3.5 2010-08-22

    I am running into a bad request error 400 on IIS7. I have encoded special characters in the URL string. My URL's look something like this (doesn't like %26): http://www.myjobs.com/a/q-Barnes+%26+Noble This would be an easy fix if I were running on .N

  • I get a 400 Bad Request error while using django-piston 2010-12-27

    I am trying to use Piston to provide REST support to Django. I have implemented my handlers as per the documentation provided . The problem is that i can "read" and "delete" my resource but i cannot "create" or "update". Each time i hit the relevant

  • 400 Bad Request error when using XMLRPC and RoR (3.1, 1.9.2) to post to a wordpress installation 2011-01-03

    I am attempting to post a blog post to a wordpress blog using XMLRPC. Here is the code I am using: def post(article) my_new_blog_post = { :description => article.article_texts.last.content, :title => article.article_title, :excerpt => '', :c

  • How to catch and log ASP.NET / WCF Bad requests errors? 2011-04-24

    I want to catch all "http 400 Bad request" errors that are sent to my WCF4 web service (REST) and currently all bad requests (perhaps error in the xml/json) is just redirected to the generic IIS 400 bad request error page. Neither the Application_Err

  • Restful WCF bad request error 2011-06-20

    I have a simple resftul wcf service. The .svc file looks like this <%@ ServiceHost Service="NameSpace.RestfulService" Factory="System.ServiceModel.Activation.WebServiceHostFactory" %> The interface method declaration [OperationContract] [WebInv

  • Sporadic 400 Bad Request Error nginx/0.7.67 with Heroku and Rails 3 2011-07-02

    UPDATE: This bug appears to be Browser Specific to Chrome. I've clicked the link about 50 times each in Firefox and IE and I can't seem to cause it. Also, once it is occurring, I can switch to FF or IE and it'll work fine on those two. I have a parti

  • 400 bad request error when trying to do a HTTP POST using python mechanize 2011-07-15

    I've checked the headers info using Live HTTP headers when doing an HTTP POST in firefox, and then I try to do this using mechanize which brought me 400 bad request error. Heres my code: MechBrowser = mechanize.Browser() LoginUrl = "http://example.co

  • Trying to access a Microsoft web-service causes a 400 Bad Request error 2011-07-21

    I'm trying to use the microsoft translator webservice in an application. Though when I try to get language names according to the example given at http://msdn.microsoft.com/en-us/library/ff512414.aspx, I get a (400) Bad Request error when I actually

  • IIS7 .NET (2.0, 4.0) completely hosed with a Bad Request (Error Code 400) error 2011-07-28

    All of a sudden all of my websites on my server return 400 Bad Request Error. I don't have a clue what happened. App Pools are running in Classic pipeline mode (4.0, 2.0), doesn't matter. Every URL that I type comes back as 400 Bad Request. Real URLs

  • 'Bad Request - Error in query syntax' when calling Webservice method with long? parameter 2011-07-28

    I'm trying to call this method of my .svc file: [WebGet] public List<Request> GetRequestFilteredForUser(string login, long? minDate, short? statut, int pageIndex, int pageSize) { /* ... */ } With this url: http://localhost/Service/DataService.s

  • How do I debug a 400 Bad Request error with DotNetOpenAuth? 2011-08-08

    I'm using DotNetOpenAuth to connect to the LinkedIn API. I am getting a (400) Bad Request when trying to call the BeginAuthorize method in their API. What am I doing wrong? I'm using Windows 7 and the firewall is disabled. --------------Solutions----

  • Bad request error when posting xml using curl 2011-09-02

    Am pulling my hair out trying to solve this problem, am getting a bad request error when posting to XML using curl. My code is: $post_string = '<XML DATA>'; $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml;

  • Consuming Wcf from Android , bad request error 2011-12-28

    Im trying to consume Wcf from Android , my code private final static String SERVICE_URI = "http://188.59.2.211:8081/Survey.svc"; String email = "[email protected]"; String password = "123"; public void onResume() { super.onResume(); Login(email,password);

  • CURL: BAD REQUESt error when trying to call http url 2012-03-13

    I am trying to call an sms api using a http url .I am trying to call the url using curl in php.I get a BAD REQUEST error .Please explain what I am doing wrong. // create a new cURL resource $ch = curl_init(); $string1 = "http://api.znisms.com/post/sm

  • always getting "bad request" error in salesforce oauth 2 authentication using appcelerator 2012-03-19

    I am able to get the access_token for the salesforce oath2. access token can expire after some time and after that we need to refresh the access token. But I am always getting "Bad Request" error in this code. function getRefreshToken(refreshToken) {

  • How to fix 400 Bad Request error? 2012-04-12

    I'm getting a The remote server returned an error: (400) Bad Request error when trying to run my code. Any help would be appreciated. Thanks. // Open request and set post data HttpWebRequest request = (HttpWebRequest)WebRequest.Create("myurl.com/rest

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.118 (s). 11 q(s)