#Property Editor w/Single File Upload

1 messages · Page 1 of 1 (latest)

compact grove
#

I've written a property editor that helps transcribe text to audio. The result is a base64 encoded audio/mp3 file.

My only issue now is attempting to save this file and attach it to my property editor model. No matter what I search for, I find myself going in circles. Has anyone tackled this?

Ideally, the file could be attached at the content & property level and NOT part of the media center.

I've seen this referenced throughout the image cropper (same behavior I'm looking for in terms of attachment) and the file upload, but it doesn't seem to "do" anything.

fileManager.setFiles({ propertyAlias: $scope.model.alias, culture: $scope.model.culture, segment: $scope.model.segment, files: [ x ] });

valid field
#

I'm not at a PC to check, but can you use the umb-property-file-upload directive? IIRC it just handles the file stuff and you can get at its value in your editor and wrap your own logic around it.

compact grove
#

In both property editors, (1) the borwser media API provides the audio file to me in chunks, and (2) the api endpoint for text to speech provides the data in base64 encoded audio/mp3. I can use the browser API to create a new File() object I suppose... I'll play around some more and report back.

valid field
#

OIC, sorry, you've already got the uploaded file - you want to save the base64 string as a file?