Skip to content

Add view for all of a user's S3 files #169

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

Closed
catarak opened this issue Oct 25, 2016 · 5 comments
Closed

Add view for all of a user's S3 files #169

catarak opened this issue Oct 25, 2016 · 5 comments
Assignees
Labels
Area: AWS S3 Category for AWS configuration Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance

Comments

@catarak
Copy link
Member

catarak commented Oct 25, 2016

No description provided.

@PaliwalSparsh
Copy link

PaliwalSparsh commented Dec 9, 2016

I guess i will be making changes here. Here the project array contains the projects and the project contains all the files in it. So we can iterate over the projects and list the files with url.

Other than this bug.
I felt it would be great if we would manage S3 like this -
http://docs.aws.amazon.com/AmazonS3/latest/dev/ListingKeysHierarchy.html
So that we can make queries to S3 more efficiently.

@catarak
Copy link
Member Author

catarak commented Dec 9, 2016

I definitely think there is room to improve the S3 querying/storage, since when I implemented the S3 uploading I wasn't thinking about querying. Do you think it makes sense to store files on S3 by username and project id? Then, for example, say you wanted to upload a file dog.jog to your project with the id abc123, and your username is catarak:
catarak/abc123/dog.jpg
Then, we could use this prefix querying to get all files for a specific user just by querying with catarak.

@catarak
Copy link
Member Author

catarak commented Dec 9, 2016

I guess this means we'd also have to write a script to migrate all of the existing files to the new naming scheme, but I don't think that would be too hard. We'd just loop through all of the projects stored in MongoDB, look at the files that have a URL, change the URL, and then update the file with the new URL.

@PaliwalSparsh
Copy link

Exactly i thought about it similarly.
<username>/<project_id>/<filename>

Outcome of our investment in establishing hierarchy -
Doing this will be really helpful for listing objects present in S3 with a query, this was the place where I saw the use of having hierarchy could help. Though the same listing operations can be done by us on the server side only and we need not move to S3 ie by just looking at files with url's(as we plan to do in this issue). I don't think things like deleting or downloading files will be affected on introducing hierarchy much as they require directly the file key.

But surely more structured S3 won't hurt.

@catarak
Copy link
Member Author

catarak commented Dec 13, 2016

I just realized that if a user uploads a file and the project has never been saved, then the project doesn't have an id. So I think we'll have to structure these like <username>/<filename>. I think this is fine anyway since we want to enforce a limit on the total size of the files a user can upload, not just the files per project.

@catarak catarak added Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance Area: AWS S3 Category for AWS configuration labels Feb 23, 2017
catarak added a commit that referenced this issue Apr 6, 2017
…'s s3 files to be namespaced under their userid
@catarak catarak self-assigned this Apr 12, 2017
@catarak catarak closed this as completed Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: AWS S3 Category for AWS configuration Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance
Projects
None yet
Development

No branches or pull requests

2 participants