cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How do i use realfilename of a media while sending it to remote server or providing a url to download or attach?

Former Member
0 Likes
796

I am creating some report via cronjob and save it as media. I want to send that file to some remote server say via FTP or provide a URL to be attached in a mail for people to download.

But what they receive is a file with name something like this: 883423435209.txt which is the PK appended by the extension of realfilename.

I want the downloaded or transferred file to be named what I am storing as realfilename say for eg. 'Report Oct-28.txt'. Please let me know how can i achieve this.

Accepted Solutions (0)

Answers (1)

Answers (1)

geffchang
Active Contributor
0 Likes

What is the Hybris version - a.b.c.d? I know that there is an issue related to this in older patches of 6.3. If you update to the latest patch of that version, it may be fixed.

Another option I could see is to copy that file and send a new file which uses the Media's realFileName attribute.

Former Member
0 Likes

I am using Hybris v6.3.0.11. I will not be able to expose them via URL if i do copy and send.

geffchang
Active Contributor
0 Likes

I just checked. The issue I was thinking of was fixed in 6.3.0.11. The latest is 6.3.0.22. Anyway, not related to your concern.

When you download the file from Backoffice, do you also get the PK.txt naming? My assumption is it's realFilename.txt.

Former Member
0 Likes

That is correct. Downloading from backoffice gives the original or real file name. I can follow that lead.

geffchang
Active Contributor
0 Likes

But if you use its URL in an email or export, the PK.txt is used. Is that right?

I suppose the 6.3.0.1 issue fixes the backoffice and HMC issue only, but probably not for other interfaces. Not sure if this can be considered a bug; maybe it can. I just don't know how you are using it, like is it the same backoffice URL that's in the email or a different URL?

Also, I'm not clear what you mean about "I can follow that lead.". Is your concern considered fixed / solvable by this approach?