DMXzone File System Connector Support Product Page
after uploading an image file, i want to rename it and its thumbnail
Asked 6 years ago
1
has this question
6 years ago Glenn Williams posted:
hello tech support, after uploading an image file, i want to rename it and its thumbnail.
for example, i can upload a local file named "u1.png" and insert the record into the database. however, i need to be able to rename the file to "trc_u1.png" so that i can know it belongs to the company ID "trc". we will have different companies uploading their images and i would like to prefix their image with their company ID. the company ID will be put into session when they log in and is availabe to the ASP page as a session variable.
selected ( local ): u1.png
uploaded ( server ): u1.png
resized saved 1 ( server ): u1.png
resized saved 2 ( server ): u1_thumb.png
renamed ( server ): trc_u1.png
renamed ( server ): trc_u1_thumb.png
What component do i need to get to be able to do that? I am thinking it might be DMXzone "File System Connector" but i am not sure if it works with "App Connect" and "Image Processor".
i am using App Connect and Image Processor and they are working thanks to earlier support from Teodor.
thanks,
Glenn
Replies
Replied 6 years ago
6 years ago Teodor Kuduschiev replied:
Hi Glenn,
Do you need to rename it during the upload process or AFTER upload, when it is already saved as xyz.jpg on the server and in the database?
Do you need to rename it during the upload process or AFTER upload, when it is already saved as xyz.jpg on the server and in the database?
Replied 6 years ago
6 years ago Glenn Williams replied:
Hi Teodor,
if possible, i think it would be better to rename it during the upload. that way, everything is done as one process. however, i am open to either way.
i know i can use the template. what i don't know is how to get the session variable into the template.
right now, i am using... trc_{name}{ext}
i tried to use ... <% Session("svBankID"
%>_{name}{ext}
but that did not work.
thanks,
glenn
if possible, i think it would be better to rename it during the upload. that way, everything is done as one process. however, i am open to either way.
i know i can use the template. what i don't know is how to get the session variable into the template.
right now, i am using... trc_{name}{ext}
i tried to use ... <% Session("svBankID"

but that did not work.
thanks,
glenn
Replied 6 years ago
6 years ago Teodor Kuduschiev replied:
In server connect, under globals you will see sessions. Define your session there - create a session with the name it has.
After you defined the session you can use it like:
After you defined the session you can use it like:
{{$_SESSION.sessionName}}_{name}{ext}