Giter VIP home page Giter VIP logo

cloudinary_public's People

Contributors

djade007 avatar jaedag avatar jonchui avatar rajan-nonstopio avatar seanconnollydev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cloudinary_public's Issues

uploadFiles with imagePicker

For a single file I do:

final List singleArray = [
            myRent['documents'][i]["newDocument"].files.single
          ];
          CloudinaryResponse expenseUrl = await cloudinary.uploadFile(
            CloudinaryFile.fromFile(singleArray[0].path,
                resourceType: CloudinaryResourceType.Auto),
          );

But how can I use uploadFiles (not multiUpload) with and array of images?

Example not working

After installing dependencies:

Screenshot 2021-04-03 at 20 15 10

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2.3 20D91 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (2 available)

• No issues found!

Unable to upload on web using different file creation method

I am using the standard way as per your documentation to upload a file. Everything work fine on the mobile app. However it seems to be unable to retrieve an URL when uploading from the Web.
Every try is followed by an "Invalid URL for upload".

I tried using the method fromByteData, fromFile, fromBytes. I suspect it is because it cannot create a path for the file ?
I viewed some of your answers but I couldn't make them work like this one

try {
CloudinaryFile cf = 
     CloudinaryFile.fromByteData(ByteData.sublistView(
          await formResult.profilePic.readAsBytes(),
     ));
            
CloudinaryResponse response = await cloudinary.uploadFile(cf);
          } on CloudinaryException catch (e) {
            error = e;
          }

The image is coming from a button:

GestureDetector(
     onTap: () async {       
       final image = await ImagePicker()
              .getImage(source: ImageSource.gallery);
                            if (image != null)
                              setState(() {
                                formResult.profilePic = image;
                              });
                          },

Signed uploads

Hi, I was trying Cloudinary_public to upload media to my cloudinary bucket.
It is working as intended for unsigned presets, but throws error for signed presets.
Any idea why this could be happening?
Thanks!

Can't upload on web, "MultipartFile is only supported where dart:io is available."

On Flutter Web, I'm calling cloudStorage.multiUpload and getting:

Error: Unsupported operation: MultipartFile is only supported where dart:io is available.
    at Object.throw_ [as throw] (http://localhost:52896/dart_sdk.js:5342:11)

Is this expected? Seems like this might be an issue in Dio, so not sure exactly where to log it.

Transformed url giving http 400 error

This url from Cloudinary works: https://res.cloudinary.com/xxx/image/upload/s--KrQpnLn4--/c_thumb,w_200,g_face/v1/xxx/xxx.jpg

This one returned by plugin give 400 error: https://res.cloudinary.com/xxx/image/upload/c_thumb,g_face,w_200/s--q2NgOpl8--/v1617419988/xxx/xxx.jpg

Http Status Error [400] when uploading a video

I'm recording a video in an iOS Device (haven't tested in Android) with the image_picker package and then uploading it but I get this DioError:

{"error":{"message":"Image file format mov not allowed"}}

Here is my code:

final pickedFile = await _picker.getVideo(source: ImageSource.camera);
CloudinaryResponse response = await _cloudinaryPublic.uploadFile(
        CloudinaryFile.fromFile(File(pickedFile.path), resourceType: CloudinaryResourceType.Video)
      ).catchError((error) {
        return Future.error(error);
      });

I have successfully uploaded an image, though.

Can't use MultiImagePicker lib

When using the MultiImagePicker plugin, we're getting this error when trying to call cloudinary.uploadFile()

[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: FileSystemException: Cannot retrieve length of file, path = 'content://media/external/images/media/89894'

The same code works fine with image_picker. When I compare the returned paths, I see this:
multi_image_picker: "content://media/external/images/media/89894"
image_picker: "data/user/0/com.example.example/cache/image_picker6683537466962246256.jpg"

So it appears as though image_picker makes some local copy, and is required for uploads to work?

Uploading from Image.memory

We're trying to upload images from a ByteData obtained from a Image.memory; however this results in an invalid image payload. The bytedata can be correctly displayed as an image.

var data = //someUint8List
var buffer = ByteData.view(data)

CloudinaryResponse response = await cloudinary.uploadFile(
    CloudinaryFile.fromByteData(buffer, resourceType: CloudinaryResourceType.Image),
);

This results in an invalid image file however. We're trying to use cloudinary in conjunction with https://github.com/fluttercandies/flutter_image_editor.

Upload a chucked video when its more that 100mb

Hello,

Ive look through this package and can't seem to find if it supports uploading of a video file of more than 100mb. When a video file is grater than 100mb you have to upload the video in chucks. Does this package support that or is it something that still needs to be implemented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.