I can't upload epub file

Options
CINO
CINO Member Posts: 3
edited November 2023 in Developer APIs

I have been having issues uploading epub file through a url link. But i keep getting the error

{

 message: 'An unknown file format not allowed',

 name: 'Error',

 http_code: 400

}

When i try to use a preset that doesn't have any format, it work but then it doesn't upload as an Epub file.

Tagged:

Answers

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 123 admin
    Options

    Hi there,

    Thanks for reaching out.

    Can you please share your cloud name, so I can check into your account? The cloud name is a public value, so there is no security risk in sharing it here. However, if that makes you uncomfortable for any reason, you can share that information with us privately by opening a support ticket directly via the following link:
    https://support.cloudinary.com/hc/en-us/requests/new

    I look forward to your reply

    Kind regards,

    Tia

    Helpful Links For You
    💬 Share questions, connect with other users in our Cloudinary Community forums and Discord server!
    🧑‍🎓 Join our Cloudinary Academy for free courses, workshops and other educational resources.
    📄 Read our documentation for in-depth details on Cloudinary product features and capabilities
    📰 Check out the Cloudinary blog for the latest company news and insights

  • CINO
    CINO Member Posts: 3
    Options

    dlsavisdq

    here is my cloud name.

    Thank you for the response

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 123 admin
    Options

    Hi there,

    When you upload a file that is not an image, or a video, you will need to pass the resource type to your upload method call. The resource type should be 'raw'. An example of how to do that in Node is as follows:

    const cloudinary = require("cloudinary").v2;
    
    cloudinary.uploader
        .upload(
            < pass the file here >,
            {
                resource_type: "raw",
            },
        )
        .then((uploadResult) => console.log(uploadResult))
        .catch((error) => console.error(error));
    
    

    Here is some documentation to get you started:
    https://support.cloudinary.com/hc/en-us/articles/202520572-Using-Cloudinary-for-files-other-than-images-and-videos
    https://cloudinary.com/documentation/upload_images#asset_types

    I hope this helps. Let me know if you have any questions.

    Kind regards,

    Tia

    Helpful Links For You
    💬 Share questions, connect with other users in our Cloudinary Community forums and Discord server!
    🧑‍🎓 Join our Cloudinary Academy for free courses, workshops and other educational resources.
    📄 Read our documentation for in-depth details on Cloudinary product features and capabilities
    📰 Check out the Cloudinary blog for the latest company news and insights

  • CINO
    CINO Member Posts: 3
    Options

    Yh, this is exactly how i did it, like i explained when i upload without a preset, it sends but the file doesn't save as EPUB, but when i use a preset it throws an error,  message: 'An unknown file format not allowed',


    I'm using a link for the EPUB file i am sending

  • Wissam
    Wissam Member, Cloudinary Staff Posts: 71
    Options

    Hi there,

    I see that the API upload preset default for Raw is "book_preset" in your account.

    I have tried to upload the file starting with "Chimamanda_Ngoz.." to your account through the console UI which uses the "ml_default" preset and I see the extension of EPUB.

    Could you provide me with a specific example where it fails and what is the exact call you are doing?

    Thanks,

    Wissam