camelot-project / frontend

The frontend: The web-facing server software for CAMELOT
BSD 3-Clause "New" or "Revised" License
2 stars 14 forks source link

Create and use unique names for uploaded files #67

Closed scog1234 closed 9 years ago

scog1234 commented 9 years ago

This set of changes allows us to create unique names for the uploaded files, and to store these names in the database. Since this directly affects what we're storing in the database, it would be good if @keflavich could review this before merging it, in case I've done something stupid.

keflavich commented 9 years ago

Looks good. Could you take it through a test run with the server on and make sure a sane pull request goes through?

scog1234 commented 9 years ago

You mean with the server running on my own machine, right?

keflavich commented 9 years ago

yes

scog1234 commented 9 years ago

OK, when I do this, I get the following exception:

Exception: Error: the remote URL https://github.com/scog1234/frontend.git (which is really 'frontend') does not match the expected one 'database'

This doesn't seem to be related to my changes - is something messed up in my local Git config?

keflavich commented 9 years ago

that's related to the github pull request generator. I don't understand it yet.

keflavich commented 9 years ago

I would try doing the following:

git submodule init
git submodule sync
git submodule update

and possibly

git submodule update --force

if needed. I don't know if this will solve your issue but it might...

scog1234 commented 9 years ago

The first two commands worked OK, but the third failed with:

fatal: destination path 'database' already exists and is not an empty directory. Clone of 'https://github.com/camelot-project/database.git' into submodule path 'database' failed

I got the same error when I tried to do the submodule update with --force

keflavich commented 9 years ago

OK, rm -r database then try again.

keflavich commented 9 years ago

I saw your PRs. Looks sane. There are other more severe bugs I'm trying to lock down locally related to authentication.

scog1234 commented 9 years ago

I also had to rm -r uploads, but after that everything worked. If you're happy that the pull requests look sane, then we can probably go ahead and merge this PR.

keflavich commented 9 years ago

OK, merged. We still need to add a user interface for the filename & link, right? Could you make an issue for that and link it here?