Documents & Files upload wizard extensions

Posted by Community Admin on 04-Aug-2018 13:32

Documents & Files upload wizard extensions

All Replies

Posted by Community Admin on 16-Dec-2013 00:00

Hi All!

We are using Documents & Files as a storage for the documents that our users may download/view. We extended the Documents & Files library with a number of custom fields and some of fields are required according to our business logic. This makes standard "Edit Document" (Actions > Edit Properties) screen a more convenient way to create documents than standard "Upload Document" wizard, so we decided to use the "Edit Document" for both upload and edit.

To change the standard behavior we used a ContentViewInsertDialog: removed the UploadDialog on upload in the Libraries > Controls > DocumentsBackend > Views > DocumentsBackendList > Dialogs and created a new one with the following params:

  • ID: ContentViewInsertDialog on upload
  • Name (The name of the dialog that user is presented with.): ContentViewInsertDialog
  • Name (The command name that user is presented with.): upload
  • InitialBehaviors: Maximize
  • Behaviors: None
  • Parameters: ?
  • ControlDefinitionName=DocumentsBackend&ViewName=DocumentsBackendEdit&parentType=Telerik__dot__Sitefinity__dot__Libraries__dot__Model__dot__DocumentLibrary&parentId=ParentId
  • Skin: Sitefinity
  • Destroy on close: False
  • Reload on show: False
so we changed the UploadDialog with ContentViewInsertDialog during the upload. 
In our test, we set the existing DocumentsBackendEdit view in the ContentViewInsertDialog settings as DocumentsBackendInsert view does not exist and we beleive that once created, it will not differ from the DocumentsBackendEdit view. Now we have this wizard showing up on upload, but it calls the DocumentService.svc with the following:

/Sitefinity/Services/Content/DocumentService.svc/parent/b7f29119-851c-4f0e-89a1-1fa4c1f84a1f/0/?itemType=Telerik.Sitefinity.Libraries.Model.Document&parentItemType=Telerik.Sitefinity.Libraries.Model.Library&providerName=OpenAccessDataProvider&managerType=&checkOut=true&createNew=true&unv_tstmp_prm=1387187036271

and service responds with the following error:

"Detail":"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."

which is displayed by an alert with ContentViewInsertDialog closing and returning to the document list. We do not see such behavior similar wizard for adding a blog post - there is no call for DocumentService.svc and no errors as well.

The question is - is there a way to achieve our goal of using the edit screen for document upload/create?

Additional question: some of our "document types" do not have the physical file associated with the document. Is there a way to omit the upload and use an external link instead of physical file?

Thanks!

P.S. We use Sitefinity 6.1

Posted by Community Admin on 19-Dec-2013 00:00

Hello Alexander,

What you are trying to do is not a trivial task. 
Edit dialog cannot directly operate as an Upload dialog. It is expecting ID of an existing document item in order to operate. 

A way to extend upload view would be to create a custom upload dialog. Please take a look at this forum thread for an example of creating custom dialog.

About the additional question: Could you give an example of a document without physical file. If your goal is to manage links to documents (which I assume cannot be downloaded) you could use Module Builder and create a custom module where instead of uploaded file field you could use short text field.

Regards,
Ferdi Nebiev
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 09-Jan-2014 00:00

Hello Ferdi,

Thank you for your reply. We decided to go with a custom module as it appears there is no simple way to bypass the file upload. As for your question - we use external storage for several types of downloadable/viewable assets and would like to store them in the Documents library in Sitefinity w/o a physical file - they are similar to uploaded ones in terms of our business logic. Anyway, this is not needed anymore as we go with a custom module solution.

Thank you!

This thread is closed