Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
c56853ae
Commit
c56853ae
authored
Jul 30, 2014
by
Stephen Sanchez
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #554 from edx/sanchez/file-upload-doc
Updating readthedocs to have FileUpload config doc
parents
34c073ac
b42916e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
docs/en_us/developers/source/architecture/fileupload.rst
+60
-0
docs/en_us/developers/source/architecture/index.rst
+1
-0
No files found.
docs/en_us/developers/source/architecture/fileupload.rst
0 → 100644
View file @
c56853ae
.. _fileupload:
##########
FileUpload
##########
Overview
--------
In this document, we describe the use of the File Upload API.
By design, this is a simple API for requesting an Upload URL or Download URL
for a piece of content. The means by which the media is stored is relative to
the implementation of the File Upload Service.
This project initially has one File Upload Service implementation for
retrieving Upload / Download URLs for Amazon S3.
The URLs provided by the File Upload API are intended to be used to upload and
download content from the client to the content store directly.
In order to provide a seamless interaction on the client, this may require an
AJAX request to first retrieve the URL, then upload content. This type of
request is restricted via Cross Origin Policy, but can be resolved through CORS
configuration on the content store.
Configuration
-------------
The Amazon S3 File Upload Service requires the following settings to be
configured:
* AWS_ACCESS_KEY_ID - The AWS Access Key ID.
* AWS_SECRET_ACCESS_KEY - The associated AWS Secret Access Key.
* FILE_UPLOAD_STORAGE_BUCKET_NAME - The name of the S3 Bucket configured for
uploading and downloading content.
* FILE_UPLOAD_STORAGE_PREFIX (optional) - The file prefix within the bucket
for storing all content. Defaults to 'submissions_attachments'
In addition, your S3 bucket must be have CORS configuration set up to allow PUT
and GET requests to be performed across request origins. To do so, you must:
1. Log into Amazon AWS
2. Select S3 from the available applications
3. Expand the "Permissions" section
4. Click "Edit CORS configuration"
5. Your CORS configuration must have the following values:
.. code-block:: xml
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedHeader>*</AllowedHeader>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>
\ No newline at end of file
docs/en_us/developers/source/architecture/index.rst
View file @
c56853ae
...
...
@@ -9,3 +9,4 @@ Architecture
workflow
ai_grading
fileupload
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment