Code Monkey home page Code Monkey logo

Comments (6)

bluefrg avatar bluefrg commented on July 4, 2024

I don't know what the expected behaviour on S3::copyObject() is when copying, but you could make a HEAD request on the url to retrieve the content type.

from amazon-s3-php-class.

yocheved avatar yocheved commented on July 4, 2024

$s3->getObjectInfo('bucket', 'inputFile'); makes a HEAD request and it doesn't return the content-type.
does this not work if the content-type is set by default on s3?

from amazon-s3-php-class.

tpyo avatar tpyo commented on July 4, 2024

That would explain why no type is returned, when an object has a content type getObjectInfo() returns it, copyObject() also copies the content type.

from amazon-s3-php-class.

yocheved avatar yocheved commented on July 4, 2024

s3 saves content-type automatically upon upload.
why does that content-type not get sent with getObjectInfo() ?

from amazon-s3-php-class.

tpyo avatar tpyo commented on July 4, 2024

It should be - I can't tell why you're not getting a content type, getObjectInfo() does return a content type:

Array
(
    [date] => 1390935679
    [time] => 1390920578
    [hash] => 0d5067fbf71ceae4ba43f7b8d5068596
    [type] => image/png
    [size] => 10580
)

from amazon-s3-php-class.

yocheved avatar yocheved commented on July 4, 2024

it wasn't returning for my object. i worked around it though.
thanks for your help

from amazon-s3-php-class.

Related Issues (20)

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.