开发者

In Django, a way for user to upload file to server, then move to Amazon S3?

开发者 https://www.devze.com 2023-02-11 13:22 出处:网络
I have a web project where users are uploading .wav files. I want to generate a waveform image from the .wav file once it\'s uploaded. But generally for storage, I want to use Amazon S3. Thing is, I w

I have a web project where users are uploading .wav files. I want to generate a waveform image from the .wav file once it's uploaded. But generally for storage, I want to use Amazon S3. Thing is, I want to use something like TimeSide (http://code.google.com/p/timeside/wiki/PythonApi) to generate the waveform image from the .wav f开发者_JAVA技巧ile.

After speaking with a coder for the TimeSide project, he said it wouldn't be appropriate to generate a waveform image when the .wav file is coming from Amazon S3. So I was thinking it needs to do it's thing as soon as the user uploads the .wav file and then after TimeSide has does it' thing, copy the .wav file and the waveform image over to Amazon S3 and then delete the files from the upload server. Would that make most sense to do it?

Can I use Python Boto library for something like this? Or would I have to code my own Django backend?


I agree, the work should be done on the server upon upload. If its just S3, i believe this one would do: http://aws.amazon.com/code/134?_encoding=UTF8&jiveRedirect=1. I also found a good tutorial perhaps this might help http://www.holovaty.com/writing/amazon-s3-media/


It would make sense to do the work on your side and then upload to Amazon S3. You should be able to use Boto, or any other library by importing the library.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号