Skip to content

Commit

Permalink
File path begins after uploads path
Browse files Browse the repository at this point in the history
  • Loading branch information
edusalguero committed Nov 14, 2016
1 parent 75a92b7 commit 6cc863d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion views/molecules/forms/edit-main.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@
var inputFile = $('#'+ inputId);
var inputName = inputFile.attr('name').replace(/[\[\]']+/g,'#');
var name = 'uploaded-content['+inputName+']';
var filePath = url.replace(/.*\/\/[^\/]*/, '').replace('{{config('anavel-crud.uploads_path')}}','');
var filePath = url;
var n = filePath.indexOf('{{config('anavel-crud.uploads_path')}}') + '{{config('anavel-crud.uploads_path')}}'.length;
filePath = filePath.substr(n);
inputFile.parent().find('.selected-from-uploads').remove();
var tpl = '<div class="selected-from-uploads" style="margin-top: 5px">' +
' <img src="'+url+'" style="width: 100px" /> ' +
Expand Down

0 comments on commit 6cc863d

Please sign in to comment.