Upload files using umbraco data type - umbraco

I want to create a custom data type or better reuse an existing one that allows me to upload a file (pdfs or images) on a specific folder (in an Umbraco 7 site) not related to media folder. Any ideas on how to do this?

You'll want to create a new property editor (Tutorial) to create the view of the datatype and let the angular code call a UmbracoAuthorizedApiController (Documentation) to do the uploading of the file

Related

Download .rcproject from remote and place it in AR view?

So, I'm following the documentation and created a composition with Reality Composer. There is a step in the docs called Add the Composition to Your App, what I would like is to add the Composition to my app dynamically. Upload the file to a server and download it from a URL.
In the tutorial, it says that when importing the .rcproject it generates a code
Xcode automatically generates code that you use to manipulate the stored objects. For example, Xcode generates a class for the scene based on the scene’s name (MyGreatScene) inside an enumeration based on the name of the project file (MyProject.rcproject). As a convenience, it also provides a loadMyGreatScene() method
Is there a way for me to generate this code downloading it from my url? Should I upload another file to be able to download it?

read write file properties with PropertyHandler Shell Extension

I'm trying to create PropertyHandler shell extension.
What's the best way for embedding properties like (Title,Author,.....) to use the same file in multi computers or devices?
StgCreateStorageEx ? way or there is other ways to do it?
because StgCreateStorageEx dealing with NTFS files only and i'm not sure if the file hold these properties with it if i open it in other device with same PropertyHandler
Is there any way to save properties inside the my file ?
The StgCreateStorageEx function creates a new storage object using the IStorage interface. This allows storing multiple data objects within a single binary file, see for example https://en.wikipedia.org/wiki/COM_Structured_Storage. So, technically, you can save almost anything in this file including embedded properties.
I don't think that this is limited to NTFS: The old Microsoft Office .doc format (and many other Microsoft products) use this storage format and work also with FAT32.
If you want to use this binary file format is a completely different question. As you did not provide any information about the content and format of your file, I cannot recommend anything. One alternative would be to store the content of your file in an xml file. Properties like Title and Author then could be added easily.

How to access uploaded files from views

All the uploaded files are stored under
__namespace__/src/__namespace/Controller/logos/file.jpg
and controller file returns only file name "file.jpg" in the view.
So how can I provide path to logo folder in my view in IMG tag
This is where you made the first "Error"! Never store user-data inside your Modules!
When you have users upload data for your module, store them under /data/module-name/! That way you can easily access the files via src="../data/module-name/filename.jpg"
Alternatively, when you want to provide files with your Module and be able to use them, theres a great Module out there called AssetManager, which in turn uses Assetic.

Component configuration file in xcode?

Lets say i want to develop an RSS Reader reusable component for iOS with a configuration file which can me updated by user. So my wish list is as follow:
Add the component to a new project in single click. Just like adding framework.
I also want that my source files are NOT visible to other user (developer).
And yes if there are resources associated with it should also seamlessly be added to new project.
And most importantly I want the developer to be able to adjust few parameters for my component eg specifying the URL for my RSS Reader.
In short after i am done all i want the developer to see are my header files and configuration file. Any ideas ?
You should use a fake framework as described here.

Sharepoint Doc Lib Content Types

So I would like it when a user creates a new folder in my sharepoint document library that 4 template documents also get added inside the new folder. I get that the user could just click on the document template for each template individual but I want them added all the time.
There doesn't seem to be an option to add template documents to a document lib folder content type.
Sooo.... Is my only alternative to create a custom sharepoint workflow that checks for the folder creation inside my doc lib. (Ideally maybe restricting it to only when a specific folder of my custom content type is created.. ) This seems like a simple workflow to create but I want to make sure that I even need to create one since I haven't actually created a custom sharepoint workflow yet...
Thanks,
Chris
You're right; there's no built-in functionality for this. It should be reasonable simple to write a workflow that runs when something is added to a library, checks to see if it is a folder, and adds the items into the folder. It would probably be easiest to have the template documents in another folder somewhere, and then copy them over.
Good luck!
I found this example that helped out a lot:
http://www.codeproject.com/KB/sharepoint/MOSS_FolderContentTypeWF.aspx

Resources