snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Comment on code to create file for Create Asset Model.

Open nrasmus opened this issue 10 years ago • 1 comments

Expected Behavior (or desired behavior if a feature request)

Attach an image in the gui for "create asset model", submit, and image is uploaded to ./public/uploads/models/randomefilename

Actual Behavior

path to the file is created in snipeit, but filename isn't created.


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 3.0.0-dev
  • What OS and web server you're running Snipe-IT on Ubuntu 14.04 Apache
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) install.sh
  • If you're getting an error in your browser, include that error 404
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error /hardware/models/create
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproduceable on the demo. yes
  • Include any additional information you can find in app/storage/logs and your webserver's logs. https://github.com/snipe/snipe-it/blob/v3/app/Http/Controllers/AssetModelsController.php#L109 The code is commented out--not so in "edit Asset Model" which works as expected.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

nrasmus avatar May 24 '16 13:05 nrasmus

I took a quick look at this, it looks like the code that saves an image in AssetModel::postCreate is commented out for some reason. Assuming its a porting relic.

mnemonicly avatar May 24 '16 14:05 mnemonicly