 
     __handleFileData: (data) =>
       @fileName = data.original_filename
+      @sanitizedName = data.filename
       @fileSize = data.size
       @isImage = data.is_image
       @imageInfo = data.image_info
       @isStored = data.is_stored
+      @s3Bucket = data.s3_bucket
       if data.default_effects
         @cdnUrlModifiers = "-/" + data.default_effects
+
+      if @s3Bucket and @cdnUrlModifiers
+        @__rejectApi('baddata')
 
       if not @onInfoReady.fired()
         @onInfoReady.fire(@__fileInfo())

      incompleteFileInfo: @__fileInfo()

    __fileInfo: =>
      uuid: @fileId
      name: @fileName
      size: @fileSize
      isStored: @isStored
      isImage: @isImage
      originalImageInfo: @imageInfo
      originalUrl: if @fileId
          "#{@settings.cdnBase}/#{@fileId}/"
        else
          null
      cdnUrl: if @fileId
          "#{@settings.cdnBase}/#{@fileId}/#{@cdnUrlModifiers or ''}"
        else
          null
      cdnUrlModifiers: @cdnUrlModifiers

    constructor: (@settings) ->
      @fileId = null
      @fileName = null
      @sanitizedName = null
      @fileSize = null
      @isStored = null
      @cdnUrlModifiers = null
      @isImage = null
      @imageInfo = null
      @sourceInfo = null
      @s3Bucket = null

      # this can be exposed in future
      @onInfoReady = $.Callbacks('once memory')
