I'm not confident that you can do that with a blob. And besides, the name property of a File object contains the full path, not just a name.

When returning a blob from the activity, I think you want to be sure you're actually returning a File object.  In the resize case, you do that with the File constructor. In the case where there is no resize, you should read the File object back out of device storage and return that.  (There have been a number of bugs involving memory-backed blobs and activities, so it is always better to use a file-backed blob if possible.)