Allow people to sell digital files instead of physical goods.
1) Add new columns to listings table:
bool is_digital.
fileforsale_id id of the file for sale.
2) Add new table fileforsale with:
Blob column containing the file for sale.
Duration in milliseconds.
Maximum allowed size of the uploaded file.
Amount owed by seller to host the file for the duration.
When a buyer pays for an order or a listing with is_digital true, the shipped field is automatically set to true upon payment, and the buyer immediately gets access to the uploaded file.
When the duration of the fileforsale expires, the fileforsale is automatically deleted, and the listing deactivated_by_admin is set to true.
The amount owed to upload the file is determined by the:
max allowed file size (specified by uploader)
file upload duration (specified by uploader)
sats per day per megabyte (admin setting)
Add another admin setting called max_uploaded_files_usage, specified in megabytes. This will disallow users to upload files when the quota would be exceeded.
Allow people to sell digital files instead of physical goods.
1) Add new columns to
listings
table:is_digital
.fileforsale_id
id of the file for sale. 2) Add new tablefileforsale
with:When a buyer pays for an order or a listing with
is_digital
true, theshipped
field is automatically set to true upon payment, and the buyer immediately gets access to the uploaded file.When the duration of the
fileforsale
expires, thefileforsale
is automatically deleted, and the listingdeactivated_by_admin
is set to true.The amount owed to upload the file is determined by the:
Add another admin setting called
max_uploaded_files_usage
, specified in megabytes. This will disallow users to upload files when the quota would be exceeded.