Selling Digital downloads


#1

Hi Moltin Team

I am currently creating a website for my client. Im looking to create a music store which sells digital music downloads. I was wondering if there is currently any integration available for uploading files , creating download links, storage etc. Is any of this possible through flows ?

Thank you


#2

I too have this same question! Thanks.


#3

Hey Guys,

This use case makes sense. I think files could be a good way to handle this (https://docs.moltin.com/advanced/files). The storage of the files would have to be handled by you. I could for see putting them in S3. I also agree there is no reason you could use flow. If you extend products to included a link to there the files are hosted you should be able to solve it this way.

Think its a great use case so happy to dig into this further. I will try looking into this today. If you have any more details to share about the project or want to do a quick chat let me know.

Couple things
So with S3 taking care of storage cheaply. Then using moltin you can easily make it transactional (pass the s3 urls in moltin product objects via flows or use files which can be included in moltin object request).

https://docs.aws.amazon.com/quickstarts/latest/s3backup/step-2-upload-file.html

-George


#4

Hey Guys,

Started stubbing this out, think it could work nicely together.

import moltin

//fetch product however you want from moltin
var product

//Get product by Id
    self.moltin.product.include([.file]).get(forID: productId, completionHandler: { (result: Result<Product>) in
        switch result {
        case .success(let product):
            self.product = product
        default: break
        }
    })

//Get product by Filter
    self.moltin.product.filter(operator: .equal, key: key, value: value).include([.mainImage]).all
        { (result: Result<PaginatedResponse<[moltin.Product]>>) in
            switch result {
            case .success(let response):
                self.products = response.data ?? []
            case .failure(let error):
                print("Get Products error:", error)
                self.products = []
        }
}


func createDigitalAudio(productId: String?) -> {"whatever music format/or asset you want to return"}?
{
    //s3 music links
    musicAsset = "https://challenges.runkeeper.com/paceAcademy/\(self.product)/music.mp3"
    return musicAsset
}


#5

Hi George

Thank you very much for looking into this. will trial this out and let you know how i get on :slight_smile:

Thanks
Andrew


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.