-
Notifications
You must be signed in to change notification settings - Fork 323
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
Doesn't work with React Native #56
Comments
Sorry for the delayed response. |
Did you manage to get it to work @isair ? Having the same problem |
There's crypto-browserify bundled in node-libs-browser, which is bundled in webpack. If you bundle your app with webpack to index.ios.js and use this for your react-native app it works. But without webpack it does not work out-of-the-box, even if you add crypto or node-libs-browser to your project. |
Just use https://github.com/cloudinary/pkg-cloudinary-core, that works like a charm! |
+1 for this issue. running in to the same problem. I've installed cloudinary-core but the package is still reported missing. Any advice? |
@mroswald thanks for pointing to the solution! @isair , @squiles ,@robinnewhouse please use cloudinary-core instead of this library.
The name of the library is import * as cloudinary from 'cloudinary-core';
var html = cloudinary.ImageTag.new( "sample", { cloud_name: "demo", width: 200, crop: "scale"}).toHtml(); |
What about uploading? |
Unfortunately uploading is not supported in the core JS library. You can implement image upload using our RESTful API. See the Endpoint documentation in this link. |
@tocker do you have documentation on uploading video using |
I can't find documentation anywhere about adding eager transformations to REST API for uploading, is there any? I also can't find any documentation for uploading CHUNKED using REST API, everything talks about cloudinary.upload_large but there's no docs of the REST equivalent. |
@tocker Any ideas? |
@isair @squiles @mroswald @robinnewhouse Working on a deadline, can anyone help? |
@GeoffreyPlitt I'm not uploading anything from the client to cloudinary, so I didn't need that functionality. For anything else, the core library is working well. |
@GeoffreyPlitt No idea,sry |
@mroswald @tocker i spent all night trying to figure out how to upload video, was hoping either one of you could just confirm that it doesn't work so I can end my stubborn pursuit of a solution. For the majority of the night, I kept getting an error that said my video file was empty, no matter what file path I used. I'm using React Native... your docs only provide one REST endpoint, and it's for image uploading. Do we just use the same endpoint for uploading video? Or do we replace 'image' with 'video' in the endpoint URI, like so: |
@quadsurf Please see http://cloudinary.com/documentation/upload_images#uploading_with_a_direct_call_to_the_api |
Cloudinary needs to get React Native working with the exact same API as the node api ASAP. It's a major blunder that Cloudinary is this late late to the party. Please inform your entire company. You have an amazing product--best in class solution for whatever this industry is called--and likely a majority of new users will be using React Native going forward. I'm one. I need this. With the exorbitant fees Cloudinary charges, I don't expect to waste time on this. I'll save that for free open source packages, but not for paid SaaS products. It's just not right for Cloudinary at this point in time. Major mistake guys. I need to be able to upload from React Native clients asap. Inform your CEO, do what you gotta do. React Native has been out for 2 years and has taken the world over. This makes zero sense. Very disappointing. |
I'm successfully using fetch() to upload to Cloudinary. But the biggest drawback is, fetch() does not support progress, so for long uploads, the user has no idea when it will finish. Huge problem. |
@taragano any word on this? |
@GeoffreyPlitt have you seen https://github.com/wkh237/react-native-fetch-blob ? I'm using this library to upload images from my React Native app to Cloudinary and it supports an upload progress callback among other features. My code looks something like:
Of course swap the things that you need to match your Cloudinary account. I'm uploading using a direct call to the API as described http://cloudinary.com/documentation/upload_images#uploading_with_a_direct_call_to_the_api I'm also doing unsigned uploads, but you should be able to do signed uploads just as well with a few more form fields after generating your signature. Good luck. EDIT: I'm just returning the Promise from the https://github.com/wkh237/react-native-fetch-blob#multipartform-data-example-post-form-data-with-file-and-data |
Very helpful, thanks! |
We've solved the issue of uploading images to Cloudinary in our RN app. But we're looking in to adding videos as well. I can't seem to find a good solution on uploading videos larger than 100MB. Is there a solution for this? It would be nice to not having to send the image in multiple calls but maybe that's the only solution. Reference: https://cloudinary.com/documentation/upload_videos#chunked_video_upload |
The video size limit for Plus plan is 100 MB. You can enjoy more file size in our higher plans. |
Hmm.. did not know that. Thanks! 😄 @aditimadan-Cloudinary |
There is also https://github.com/XavierColombel/react-native-cloudinary-unsigned, but I haven't been able to get that to work. |
What’s the current best way to upload from RN? Most comments here are old and they don’t seem conclusive. Couldn’t find anything in the official docs or SO either (except for negative answers). |
@alanpog While publishing a react-native SDK is on our roadmap, we still don't support it. I'll gladly let you know once it's ready. In the meantime, you can use our JavaScript or React SDKs. |
Is there any way we can get an update to the availability of a RN SDK? |
@dormied There is still no ETA but we'll update here as soon as we have more information |
how to delete image from cloudinary in react-native |
@kirantripathi As mentioned, we don't support React Native or client-side deletions (for security reasons). That being said, we give the option to delete the image on client-side for the newly uploaded image, but the token expires in 10 minutes. For more information: https://support.cloudinary.com/hc/en-us/articles/202521132-How-to-delete-an-image-from-the-client-side- |
I found the solution to uploading videos. I started off by using expo-camera's recordAsync to get the video URI.
Edit: Formatting |
Due to crypto dependency.
The text was updated successfully, but these errors were encountered: