Skip to content
Permalink
f264d8c92b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
92 lines (57 sloc) 4.32 KB
# File Sharing
A website to help users share large files. The files must not be stored in the public directory on the server. All details about the file upload must be stored in a database.
---
## Testing
The system should include the data for at least 10 real books and include the correct details for each. The customer details should also be valid.
You are required to create the following accounts to allow the system to be tested. All accounts should have the password `p455w0rd`:
1. `user1`
2. `user2`
---
## Feature 1
Users must be logged in to view the homepage. If not logged in they should be redirected to the login screen. This screen should have an **Upload file** link or button that takes then to a screen where they can upload a file. This should request the following information:
1. A descriptive name to link to the file.
2. The file itself (max 1GB).
3. An optional multi-line description.
This information should be saved to the database including the path and filename of the uploaded file. In addition the following data should also be logged but without the user needing to enter this in the form.
1. The username of the user uploading the file.
2. The date and time the file was uploaded.
3. A unique hash.
4. The mime-type of the file.
5. The size of the file (in bytes).
6. The number of times the file has been downloade (set to 0).
> To demonstrate this feature and to prove that the form works correctly you will need to show that the data is being persisted correctly, either by running a database query or an API call depending on the platform and technology you are using.
## Feature 2
The homepage should display details for the files the logged-in `user` has uploaded. This should include:
1. The descriptive name.
2. The type of file (based on the mimetype calculated by the server).
3. The date the file was uploaded (but not the time).
4. The size of the file (in MB).
## Feature 3
There should be a **Details** link or button that takes the logged-in user to a _File Details_ screen that displays the following information for each file:
1. A thumbnail of the file if an image or a standard graphic to indicate the type of file (pdf, word doc, etc).
2. A link to allow the file to be downloaded.
3. The descriptive name.
4. The description if provided.
5. The size of the file.
6. The number of times the file has been downloaded (should display 0).
## Feature 4
This feature requires you to provide a secure file download link and capture the number of downloads:
1. There should be a unique download link provided on the details page that can be shared with others. This should be in the format `/download/xxx` where xxx is the unique hash you stored in the database for each file. This can be sent to people so they can download the file.
2. If a person clicks on this link who is already logged into the system the correct file is downloaded and the download count for that file is incremented in the database.
3. If the person clicking the link is not logged in they are redirected to the login page. Once logged in, the file downloads and the counter is incremented.
4. The person who uploaded the file can supply the username of the person authorised to download. Only that user can download the file with other users being told why the file is not available.
----
## Extras
In some assignment briefs you are given marks for the appropriate use of media and using sensors built into the user's device.
### Sensors
In some assignment briefs you are given marks for the appropriate use of sensors and sensor data. You should be implementing:
1. When a file is uploaded the user should be given the option of using the integrated camera (if available).
2. All uploaded images should be location-tagged.
3. The user uploading a file should have the option to restrict access to users in the same country.
### Media
In the requirements listed above you need to provide the user with the ability to upload photos. For the extra media marks you will need to expand this by:
1. Providing the user with the choice of uploading photos, video clips or audio clips.
2. Giving users the option to directly capture images, audio and video clips using the built-in camera and/or microphone if available.
### Data
There are lots of online RESTful APIs you can make use of when developing this system. You should consider:
1. [LocationIQ](https://locationiq.com)