punchcard-cms / punchcard

The Punchcard CMS
Apache License 2.0
31 stars 19 forks source link

Bug: 4 bugs related to file storage #638

Closed scottnath closed 7 years ago

scottnath commented 7 years ago

In testing out using Punchcard on bluemix with AWS, I found four bugs.

Bug 1: value not saved when adding content

When adding a new piece of content, the system was error-failing when trying to grab existing data for the new piece of content. Specifically, knex is creating an integer error because the revision variable was' ' instead of an integer.

Bug 2: create tmp dir; move middleware

A temp directory needs to be created in the /public directory, after it has been created. This requires a slight change to the upload middleware, so it should be moved to the init related to routes (should have been put their originally)

Bug 3: missing local public file dir on fs storage

Same problem as above (directory not being created), except specific to when storing files locally. Should create the /public/files directory after the public directory is create.

Bug 4: improper creation of file path

AWS does not like it if the url is not formed correctly. Should use node's path to make sure a proper url is created