Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
9 subscribers
Views
5686 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
How to overwrite previously uploaded file with different extension.
rahulk599
over 8 years ago
Guys can any one help me for how to overwrite a file :
I have a fileupload on one interface from where i am uploading a file, and i have another interface from i want to upload the new version of the file.
I know how to overwrite the file if the same extension we are uploding by using the document id. Document is not getting overwrite, its creating new file in the selected folder. I dont want extension limit to upload.
E.g : on first interface i have upload .txt and when i am uploading final version of the same file i can upload any type of file e.g .txt, doc,xsd etc
OriginalPostID-249845
Discussion posts and replies are publicly visible
0
rodgraham
Certified Lead Developer
over 8 years ago
If you are wanting to add a new version of a document with a different extension then I think you'll have to upload a new document and delete the original, rather than uploading a new version.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@rahulk And post form submission, if needed, revert the updates(such as deleting the previously uploaded file/ or related data in the database) if a difference in extension is found.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ram
Certified Lead Developer
over 8 years ago
Hi rahulk599,
I would like to suggest another approach rather than deleting and uploading a new document with different extension try saving all the documents in a unique folder.
And these document ids are saved to a database table along with a version number, a foreign key relationship id.
You can add more columns depending on your need and then you need to make a small tweak in your sail interface where the target property of file upload component should point folder id instead of the document id as we are not overwriting the document technically.
By following this approach you can save old version documents and you can retrieve them as per the version.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
Fair enough as long as the requirement is complex and growing(and if there is really a need for customised document management component) and could be be over-engineering if the requirement is quite simple. On the whole, it really depends.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rajats246
over 6 years ago
We can't upgrade the version of file with different extension.For keeping track of the version you can take the help of DB and mark the latest one as active.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ravalik
A Score Level 1
over 6 years ago
Hi rahulk,
To my knowledge what I would suggest is you can create a template with the extension you choose and use that template in text doc from template smart service and can generate a document.I am not sure whether it serves your purpose but giving an idea to go for a suitable consideration .And Moreover I could see a shared component which works for a document images .please find the link attached.
docs.appian.com/.../Document.html.
Thanks,
ravalik
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel