How do I create audiofield (formfield as audio widget) content programmatically?
Specifically how I do "import" file contents (in this case MP3 files).
I tried node import module but does not seem to work properly.
This is Drupal 6 implementation.
Thanks,
Murali
I am not sure I fully understand your question. If you would like to upload an mp3 file to a cck node, you can use the filefield module.
create a new cck node-type
add a filefield to this nodetype, and select 'file' as the field type.
Configure this filefield: Under "Permitted upload file extensions", enter "mp3".
Under "number of values", selected "unlimited" if you would like to upload an arbitrary number of mp3 files.
Once you define your node-type, you can programatically create a node with node_save(). See here: http://drupal.org/node/1111514
Related
We are using Kentico 10
Question 1
We are using DirectUploadControl to upload image in a page form.
We have column PDFImage in the page type. I can see the value of this field to be a GUID.
Where the image is stored on disk when uploaded by this control? Which table is updated with file name?
I tried the page type table, cms document and media file but couldn't find.
Question 2
We need to process the image when uploaded. Is there an event? Right now we are doing this in DocumentEvents.SaveVersion.After
This depends on how the system is set to store files. So, it can be in the DB or on disk or both. When on disk, it depends what folder is set to store the attachments.
In the document events there is the SaveAttachment event - so maybe you can try using that one. Or, it might be better to create a custom uploader form control - depending on your needs.
I'm encoding a video file using the built-in adaptive streaming transform. Once the file is successfully processed, an asset container is created with the below files:
Is it possible to provide custom file names at the time a job is created? It seems that the default behavior is to take a certain number of characters from the original file name and prepend them in the above file names. If possible, I'd like to configure this behavior.
P.S. I'm using the .NET SDK.
You can create a custom transform to output file names differently. On https://learn.microsoft.com/en-us/rest/api/media/transforms/createorupdate#definitions search for the Mp4Format section. In that you can specify the filenamePattern with certain macros like {Bitrate} and {Codec}.
See https://learn.microsoft.com/en-us/azure/media-services/latest/custom-preset-cli-howto for an example custom transform and the process by which to create it in Media Services.
I use the macros on my jobs, they work ok. I have a process that takes 3 videos (an intro section, the actual content, and the outro section) and encodes them as one single video. The issue I have with the macros is that it uses the file name of the first video in the inputs. So it ends up using the file name of the intro video which is a generic name. They need to have a way where we can have a little more control.
I suppose I could copy/rename the intro video to a desired name before I encode and it would pick it up, but that seems to be a little bit of overkill.
The Macros are good, but they could use some enhancements I think.
As far as I understand, APEX 5.1 does not support Excel files to be loaded into tables.
I found this package that seems to make it possible to SELECT from Excel files, but it does not show how to use it with, for example, files loaded via the "File Browse" Item.
Now, I am very new to this environment, so please explain it from the beginning.
What I did is I upload the package script to the SQL workshop and executed it, without errors. But now?
APEX 5.1 doesn't support it out of the box, but you can use the EXCEL2COLLECTION plugin (available here).
It is very straightforward, just create a file browse page item with an upload button which calls an onsubmit process (e.g. CreateCollection) of type Excel2Collection[Plug In] - specify the file browse item, a collection name and the CSV separator, then you can do as you please with the data (e.g. you may want to run some validations on the data then insert it into a table where you can access it as normal).
I am currently working with Drupal 6, and I have been working on a custom module that is doing specific functionality for a site. Currently, I still have 1 functionality to be fixed. It is when a file is uploaded to node, I wanted to do other stuff. My question is, how can I capture that event? It's like
when a file is uploaded {
read the file
print an additional info to the field (a cck field)
}
Use filefield's hook_file_update().
See here: http://www.wesjones.net/home/2011/03/drupal-6-how-to-change-filename-on-upload
How do you display audio files like an imagepicker? I'm using the MPMediaplayer class but I can't get it to work. My requirement is to click on a tableviewcell, and have audio files appear like an imagepicker.
simple get the path of all audio files. and parse the name only from the path. store all the names in array and display in UITableView. just read about how to use nsfilemanager.