Skip to content
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

Unable to attach documents to an asset #1962

Closed
2 tasks done
calessio opened this issue Apr 19, 2016 · 3 comments
Closed
2 tasks done

Unable to attach documents to an asset #1962

calessio opened this issue Apr 19, 2016 · 3 comments

Comments

@calessio
Copy link

Expected Behavior (or desired behavior if a feature request)

PDF successfully attached to a New Asset


Actual Behavior

I'm in the "New Asset" form and the only button I see to attach a document is "Upload Image".
If I use it to upload a PDF, I get an Error 500.
It seems it accepts only images.


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running
    v2.1.0-55-g701c16f
  • What OS and web server you're running Snipe-IT on
    Ubuntu 14.04 - Apache 2.4.7
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
    manual
  • If you're getting an error in your browser, include that error
    Oh no!
    Server Error: 500 (Internal Server Error)
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
    hardware/create
  • If a stacktrace is provided in the error, include that too.
    Intervention \ Image \ Exception \ NotReadableException

Unable to read image from file (/tmp/phpIqb8fA).
Open: /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php

     * @return \Intervention\Image\Image
     */
    public function initFromPath($path)
    {
        $info = @getimagesize($path);

        if ($info === false) {
            throw new \Intervention\Image\Exception\NotReadableException(
                "Unable to read image from file ({$path})."
            );

GET Data empty

@snipe
Copy link
Owner

snipe commented Apr 19, 2016

That field is not intended for PDFs, just for images of the asset. You can add other files once the asset has been created.

@calessio
Copy link
Author

Thank you for the prompt response!

@VinnyPolar
Copy link

I'm not able to attach a PDF in the additional files field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants